You try to run a Pod but see the status "CrashLoopBackOff". What does it means? How to identify the issue?
Answer
The container failed to run (due to different reasons) and Kubernetes tries to run the Pod again after some delay (= BackOff time).
Some reasons for it to fail:
- Misconfiguration - misspelling, non supported value, etc.
- Resource not available - nodes are down, PV not mounted, etc.
Some ways to debug:
kubectl describe pod POD_NAME- Focus on
State(which should be Waiting, CrashLoopBackOff) andLast Statewhich should tell what happened before (as in why it failed)
- Focus on
- Run
kubectl logs mypod- This should provide an accurate output of
- For specific container, you can add
-c CONTAINER_NAME
- If you still have no idea why it failed, try
kubectl get events