Pods (Contd)
Imperative Way to manage k8s objects
- Refer Here for official docs
Pod lifecycle
- K8s Pods will have following states
- Pending
- Running
- Succeded
- Failed
- Unknown
Container States in k8s pod
- Waiting
- Running
- Terminated
- Refer Here for container states
- IN pods we can specify container restart policy Refer Here
Container restart policy
- Lets try to create a short lived contianer with different restart policies
- Refer Here for manifests with restartPolicy
- always (Default)
- never
- OnFailure
- exit code => success
- exit code => failure
- always (Default)