Interview Prep/Kubernetes/Pods & Workloads

Describe the Pod lifecycle phases and container states.

IntermediateConceptPods & Workloads
Answer

Pod phases are Pending, Running, Succeeded, Failed and Unknown. Containers have states Waiting (with reasons such as ContainerCreating, ImagePullBackOff, CrashLoopBackOff), Running and Terminated (with exit code and reason). Pod conditions (PodScheduled, Initialized, ContainersReady, Ready) tell you finer detail.

kubectl describe pod web-0 | sed -n '/Conditions/,/Volumes/p'
All Kubernetes questions Roadmap: Kubernetes core

More on Pods & Workloads