A pod is the atomic unit of scheduling and is a run-time entity. It is transient in nature and can have multiple containers within.
If a pod fails, Kubernetes can automatically create a new replica of that pod to continue operations.
The pod cannot alter/heal it's state directly and an external controller (schedulter, proxy ..) is needed to repair
States
Pending State
The pod has been accepted by the API server. The pod remains in the pending state until the containers are started.
Running State
The pod has been scheduled to a node and all the containers in the pod have been created and are running.
Succeeded State
The pod has performed the task. All the container(s) exited or terminated with status 0 and after that marked as Succeeded.
Failed State
Pod reaches this state when all the containers have exited or terminated but one or more container(s) have returned back with a non-zero status.
Unknown State
Occrus when kubelet
is unable to get the state of the pod due to multiple reasons, like if there is a crash or if livenessProbe
keeps failing or pod has come-up after readinessProbe
has timed-out.
State transitions
Source: https://livebook.manning.com/book/kubernetes-in-action-second-edition/chapter-6/v-12/5
Top comments (0)