Kubernetes Pod LifeCycle
Every time we submit pod configuration to the Kubernetes cluster, it first comes in a pending state.
- This scheduler looks for the healthy work node and kubelet will download all necessary container images and start creating the pod.
- This pod will remain in the pending state until all resources are up and ready.
- Once the scheduler finds the worker node to schedule, pods come into the running state.
- In running state, Pod has been bound to a node, and all of the containers have been created.
- If pods are terminated due to some reason, they may not get recreated if there are no controllers such as DEPLOYMENT’S or Replica set.
- If the pod completes all of its tasks, it gets terminated and enters into the succeeded state.
- Pods that are in a pending state, it goes into the failed state due to a typo in the image name or image version.
- If the pod is in the unknown state, it means the pod’s status could not be obtained
You can check the status of Pod running the below commands.