Quick Tip: Debugging CrashLoopBackOff

Pod crashing immediately? Here is how to debug it when 'kubectl logs' returns nothing.

D
Daniel Paz
1 min read

CrashLoopBackOff is the “PC Load Letter” of Kubernetes. It tells you something is wrong, but not what.

Usually, you run kubectl logs my-pod, but if the app crashed instantly, the logs might be empty or already rotated.

Here are the two commands that actually help.

1. The Previous Flag

This shows you the logs of the last instance of the container that died.

Terminal window
kubectl logs my-pod --previous

90% of the time, the error stack trace is hiding here.

2. The Events

If logs are empty, it might be a Kubernetes-level error (OOMKilled, MountFailed, etc.).

Terminal window
kubectl describe pod my-pod

Scroll to the bottom. The Events section will tell you if it failed to mount a secret, failed a liveness probe, or got killed by the OOMKiller.

Stop guessing. Check --previous.

👨‍💻

Daniel Paz

Marketing Lead

Read Next

Join 1,000+ FinOps and platform leaders

Get Kubernetes and ECS cost tactics delivered weekly.