A pod phase is a high-level Kubernetes status value summarizing the pod’s current lifecycle stage. It appears in the Pod object’s status section and provides a quick view of what is happening, while conditions and container states explain the situation in more detail. section 6.1 section 6.1.1
A pod can have one of five phases:
- Pending: the Pod object exists, but the pod is not yet scheduled, or its container images have not been pulled and started. section 6.1.1
- Running: at least one container in the pod is running. section 6.1.1
- Succeeded: every container in a non-permanent pod completed successfully. section 6.1.1
- Failed: a non-permanent pod has at least one container that terminated unsuccessfully. section 6.1.1
- Unknown: the Kubelet is no longer communicating the pod’s state to the API server. section 6.1.1
Inspecting a pod phase
Create a pod with kubectl apply -f pod.kiada.yaml, then inspect its phase with kubectl get po kiada -o json | jq .status.phase. A healthy pod may report phase: Running. kubectl describe po kiada also displays the status near the top. section 6.1.1
Table 6.1 List of phases a pod can be in
|
Pod phase
|
Description
|
|---|---|
Pending
|
The initial phase starts after the Pod object is created. Until the pod is scheduled to a node, and the images of its containers are pulled and started, it remains in this phase.
|
Running
|
At least one of the pod’s containers is running.
|
Succeeded
|
Pods that aren’t intended to run indefinitely are marked as
Succeeded when all their containers complete successfully.
|
Failed
|
When a pod is not configured to run indefinitely and at least one of its containers terminates unsuccessfully, the pod is marked as
Failed.
|
Unknown
|
The state of the pod is unknown because the Kubelet has stopped reporting communicating with the API server. Possibly the worker node has failed or has disconnected from the network.
|
Compare the five phases and their lifecycle meanings in one reference table. section 6.1.1
