KCNA ยท Storage and troubleshooting
Troubleshooting a failing Pod
Pending, ImagePullBackOff, CrashLoopBackOff, OOMKilled, reading status, events and conditions.
Key points
- Start with kubectl describe pod and read the Events at the bottom.
- Pending usually means the Pod is not scheduled (insufficient resources, unavailable hostPort).
- ImagePullBackOff means the image cannot be pulled (wrong name or tag, missing image, missing credentials).
- CrashLoopBackOff means the container keeps exiting, so read kubectl logs --previous and the last state.
Source: https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/
Practice questions
What does the status ImagePullBackOff indicate?
- The container image cannot be pulled
- The container exceeded its memory limit
- No node has enough CPU
- A liveness probe is failing
Show answer
Answer: A. The container image cannot be pulled
The kubelet cannot pull the container image and is retrying with growing delays. It is not about probes, memory or scheduling.
Which are common causes of ImagePullBackOff?
- A memory limit that is too low
- A misspelled image name or tag
- The image was never pushed to the registry
- Missing credentials for a private registry
- A failing liveness probe
Show answer
Answer: B. A misspelled image name or tag, C. The image was never pushed to the registry, D. Missing credentials for a private registry
A wrong image name or tag, an image that was never pushed, or missing registry credentials all stop the pull. A failing liveness probe or low memory limit affect a running container, not the pull.
True or false: kubectl logs on a crash-looping container always shows why the previous instance crashed.
Show answer
Answer: False
False. Without a flag it shows the current instance, which may have just started. Use --previous (-p) to read the logs of the earlier instance.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
