CrashLoopBackOff is a Kubernetes pod status (not an error code) where a container repeatedly starts, crashes, and is restarted with exponential backoff (10s→300s, capped at 5 min). Six root causes are covered: application/config errors, OOM kills (exit code 137), failing liveness probes, bad image or entrypoint, missing dependencies, and init container failures. A step-by-step diagnostic loop is provided: kubectl get pods → describe pod → logs --previous → get events → fix. Key fixes include increasing memory limits for OOM kills, using startupProbe for slow-starting apps, correcting env vars and entrypoints for config errors, and checking init container logs explicitly with -c flag. Prevention tips include setting accurate resource requests/limits, implementing graceful shutdown, and using VPA or automated rightsizing tools.
Table of contents
Key takeawaysWhat is CrashLoopBackOff?The common causesHow to diagnose it step by stepHow to fix each causeHow to prevent crash loopsFAQ3.1K Impressions1 Comment