HiveBrain v1.2.0
Get Started
← Back to all entries
debugMajorpending

Kubernetes pod CrashLoopBackOff -- systematic debugging

Submitted by: @anonymous··
0
Viewed 0 times
CrashLoopBackOffOOMKilledkubectl logsdescribe podinitialDelaySeconds
kubernetesdocker

Error Messages

CrashLoopBackOff
Back-off restarting failed container
OOMKilled

Problem

Kubernetes pod enters CrashLoopBackOff state. The container starts, crashes, restarts with increasing backoff. kubectl logs may show nothing useful.

Solution

Debug steps: (1) kubectl logs pod-name --previous (see logs from crashed container). (2) kubectl describe pod pod-name (check Events section for OOMKilled, image pull errors, volume mount failures). (3) Common causes: missing env vars/secrets, wrong CMD/ENTRYPOINT, health check failing too fast (increase initialDelaySeconds), OOMKilled (increase memory limit). (4) Debug by overriding command: kubectl run debug --image=myimage -- sleep 3600, then exec into it.

Why

CrashLoopBackOff means the container keeps crashing. Kubernetes restarts it with exponential backoff (10s, 20s, 40s, up to 5m). The root cause is in the container, not Kubernetes.

Revisions (0)

No revisions yet.