LifecycleHandler
io.k8s.api.core.v1.LifecycleHandler
source ↗
LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.
execExecActionExec specifies a command to execute in the container.
command[]stringCommand is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.httpGetHTTPGetActionHTTPGet specifies an HTTP GET request to perform.
hoststringHost name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.httpHeaders[]HTTPHeaderCustom headers to set in the request. HTTP allows repeated headers.
namestring requiredThe header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.valuestring requiredThe header field valuepathstringPath to access on the HTTP server.portIntOrString requiredName or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.schemestringScheme to use for connecting to the host. Defaults to HTTP.sleepSleepActionSleep represents a duration that the container should sleep.
secondsinteger (int64) requiredSeconds is the number of seconds to sleep.tcpSocketTCPSocketActionDeprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.
hoststringOptional: Host name to connect to, defaults to the pod IP.portIntOrString requiredNumber or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.