Running workloadsLesson 13 of 14
Reading status in three layers and the troubleshooting order
The single "status" column in the pod list mixes three different layers of information. Here we unpack it and follow where to look first, events or logs, in each situation. Which stage of pod startup gets stuck is covered in How a Pod Starts.
Pod phase—
Container state—
Reason—
READY—
RequestResponse / reportAppears in a later step
What you will learn
- Why the status column mixes phase names and reason names
- A Running pod can still be short on READY
- Pre-run problems: events first; post-run failures: logs first
- When many pods fail at once, look at the node
Where to look first
| What the status column shows | Unpacked (phase / container / reason) | Look first at | What to check |
|---|---|---|---|
Pending | Pending / none yet / FailedScheduling | Events | Insufficient cpu·memory: requests, quotas, node headroom; taint: placement rules |
ImagePullBackOff | Pending / Waiting / ImagePullBackOff | Events | not found: name and tag; unauthorized: credentials; timeout: registry address and network |
CrashLoopBackOff | Running / Waiting / CrashLoopBackOff | Previous container logs | App error messages, reason and exit code in Last State |
OOMKilled | Running / Terminated / OOMKilled | Memory usage | Compare the memory limit with actual usage |
CreateContainerConfigError | Pending / Waiting / CreateContainerConfigError | Events | Whether the referenced ConfigMap or Secret exists and the key names match |
Unknown, many pods failing at once | Unknown / - / - | Node status | NotReady, pressure conditions |
See events with kubectl describe pod <name> and the previous container's logs with kubectl logs <name> --previous. Logs exist only on pods, so when you spot a problem on a Deployment, drill down to its pods. See all events in a namespace with kubectl get events --sort-by=.lastTimestamp.
Try it yourself
kubectl get pods # STATUS: one merged value
kubectl get pod <pod> -o jsonpath='{.status.phase}' # The phase on its own
kubectl describe pod <pod> # Events and Last State
kubectl get events --sort-by=.metadata.creationTimestamp # Recent events (gone after ~1 hour)
kubectl logs <pod> --previous # Logs of the exited container
kubectl describe node <node> # Node Conditions when many pods fail
Check yourself
Further reading: Debug pods · kubectl cheat sheet · Pod lifecycle · When a Pod Dies (Self-Healing)