CKAD — Common Pod Problems

1 minute read

CrashLoopBackOff

The container keeps crashing and Kubernetes keeps restarting it with increasing backoff delays.

# Check the exit code
kubectl describe pod my-pod | grep -A3 "Last State"
# Exit Code: 1 → Application error
# Exit Code: 137 → OOMKilled (out of memory)
# Exit Code: 139 → Segfault

# Check the logs
kubectl logs my-pod --previous

# Common fixes:
# - Wrong command/args in the Pod spec
# - Missing environment variables or config
# - Application bug
# - Insufficient memory (increase limits)

Exit code reference:

  • 0 — Normal exit (success)
  • 1 — Application error
  • 137 — OOMKilled (SIGKILL) — container exceeded memory limits
  • 139 — Segmentation fault (SIGSEGV)
  • 143 — Graceful termination (SIGTERM)

ImagePullBackOff

Kubernetes cannot download the container image.

kubectl describe pod my-pod | grep -A5 Events
# "Failed to pull image" or "image not found"

# Common fixes:
# - Check image name and tag
# - Verify the image exists in the registry
# - Add imagePullSecrets for private registries
# - Check network connectivity from nodes

Pending Pod

The Pod cannot be scheduled to any node.

kubectl describe pod my-pod | grep -A5 Events

# "Insufficient cpu" → No node has enough CPU
# "Insufficient memory" → No node has enough memory
# "no nodes available" → All nodes are tainted or cordoned
# "pod has unbound immediate PersistentVolumeClaims" → PVC not bound

# Common fixes:
# - Reduce resource requests
# - Add more nodes
# - Check node taints: kubectl describe node <name> | grep Taint
# - Check PVC: kubectl get pvc

OOMKilled

The container used more memory than its limit allows. Kubernetes kills it immediately.

kubectl describe pod my-pod | grep OOMKilled

# Fix: Increase the memory limit
kubectl set resources deployment/web -c app --limits=memory=512Mi

Quick Reference: Status → Action

Status First Command Likely Cause
CrashLoopBackOff kubectl logs --previous App error, wrong cmd, missing config
ImagePullBackOff kubectl describe pod Wrong image name, private registry
Pending kubectl describe pod No resources, taints, PVC issues
OOMKilled kubectl describe pod Memory limit too low
RunContainerError kubectl describe pod Wrong command, missing binary

Next: kubectl debug

Updated: