How do you troubleshoot a Pod that will not start?medium

Type
applied
Topic
operations
Frequency
very common
Tags
operations
Answer

Check Pod status and events ( kubectl describe pod ), read container logs ( kubectl logs ), and diagnose based on the failure state: Pending, CrashLoopBackOff, ImagePullBackOff, or OOMKilled.

Explanation

Pending: insufficient resources (CPU/memory) or no nodes match node selector/affinity - check events for "Insufficient cpu". ImagePullBackOff: wrong image name, tag, or missing registry credentials - check the image reference and imagePullSecrets. CrashLoopBackOff: container starts but exits immediately - check logs for the crash reason (missing env var, config error, exception at startup). OOMKilled: container exceeded memory limit - increase limit or fix the memory leak. kubectl exec -it pod -- /bin/sh for interactive debugging when the container starts.

Follow-upHow do you debug a Pod that starts but immediately crashes before you can exec into it?