troubleshooting#kubernetes#debugging
Kubernetes Pod stuck in CrashLoopBackOff
A methodical checklist to diagnose and fix crash-looping pods in production.
Problem
A pod keeps restarting with `CrashLoopBackOff` status. Logs show it starts, then dies within seconds.
Step-by-step Solution
- 1Run `kubectl describe pod <name>` — read the Events section for OOMKilled, ImagePullBackOff or readiness failures.
- 2Get logs from the crashed container: `kubectl logs <name> --previous`.
- 3Check resource limits — if OOMKilled, increase `resources.limits.memory`.
- 4Verify config: `kubectl get configmap`, `kubectl get secret` — ensure keys the app expects exist.
- 5Test the image locally: `docker run --rm -it <image>` and reproduce the crash outside K8s.
- 6If the app needs a warm-up period, add a `startupProbe` with generous `failureThreshold`.
- 7Once stable, add an alert on `kube_pod_container_status_restarts_total > 3` to catch regressions early.
See problem and step-by-step solution above.
Keep reading
You may also like
troubleshooting
PostgreSQL: Too Many Connections
The classic Postgres scaling wall — and how PgBouncer solves it.
Read
troubleshooting
Nginx 502 Bad Gateway after Deploy
Nine times out of ten it's one of these five issues — here's how to isolate them.
Read
troubleshooting
K8s Errors Part 2: Networking (Services, DNS, Ingress, CNI, NetworkPolicy)
"It works on my pod, why not the service?" — 15 network-layer errors and their fixes.
Read
Discussion (3)
UI
UI_Tester
Aug 2, 2026
UI seeded pending comment for testing.
PL
Playwright Tester
Aug 2, 2026
Great article, thanks for sharing this deep-dive.
AL
Alice
Aug 2, 2026
This runbook saved my afternoon. Thanks!