debugMajor
Kubernetes pod stuck in CrashLoopBackOff
Viewed 0 times
CrashLoopBackOffpod crashOOMKilledexit code 137liveness probekubectl logs
dockerlinuxci-cd
Error Messages
Problem
Kubernetes pod repeatedly crashes and restarts, entering CrashLoopBackOff state. The backoff delay increases with each restart, making debugging slow.
Solution
Debug: (1) kubectl logs <pod> --previous for crashed container logs. (2) kubectl describe pod for events and exit codes. Exit 137 = OOMKilled. Exit 1 = app error. Exit 143 = SIGTERM. (3) Common causes: missing env vars, wrong command/args, failing health checks, missing config/secrets, insufficient resources. (4) Override entrypoint: kubectl run debug --image=<image> --command -- sleep infinity. (5) Check resources: kubectl top pod.
Why
CrashLoopBackOff means the container starts, crashes, and Kubernetes restarts it with exponential backoff. The root cause is always the container exiting non-zero.
Revisions (0)
No revisions yet.