Kubernetes Pod lifecycle phases¶
The Pod lifecycle phases represent the high-level status of a Pod within its lifecycle from creation to termination.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md] These phases are determined by the status of the containers inside the Pod and are visible in the STATUS field when executing kubectl get pods.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
Phase States¶
There are five possible phase values for a Pod^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]:
- Pending: The Pod has been accepted by the cluster, but the scheduler has not yet assigned it to a node, or container images are still being downloaded.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
- Running: The Pod is bound to a node, and all containers have been created. At least one container is still running, or is in the process of starting or restarting.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
- Succeeded: All containers in the Pod have terminated successfully and will not be restarted.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
- Failed: All containers have terminated, and at least one container terminated in failure (e.g., exited with a non-zero status code or was terminated by the system).^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
- Unknown: The state of the Pod cannot be obtained, typically due to a communication error between the node and the master.^[400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md]
Related Concepts¶
- [[Restart policy]]
- [[Kubernetes Probes]]
Sources¶
400-devops__06-Kubernetes__k8s-ithelp__Day10__README.md