# io.k8s.api.core.v1.LifecycleHandler

From **Kubernetes**.

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.

- Type: `object`

## Properties

### `exec`

- Required: false
Exec specifies a command to execute in the container.

### `httpGet`

- Required: false
HTTPGet specifies an HTTP GET request to perform.

### `sleep`

- Required: false
Sleep represents a duration that the container should sleep.

### `tcpSocket`

- Required: false
Deprecated. 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.

## JSON Schema

```json
{"description":"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.","properties":{"exec":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.ExecAction"}],"description":"Exec specifies a command to execute in the container."},"httpGet":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.HTTPGetAction"}],"description":"HTTPGet specifies an HTTP GET request to perform."},"sleep":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.SleepAction"}],"description":"Sleep represents a duration that the container should sleep."},"tcpSocket":{"allOf":[{"$ref":"#/components/schemas/io.k8s.api.core.v1.TCPSocketAction"}],"description":"Deprecated. 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."}},"type":"object"}
```
