Bitzu

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

Single choice

What does the status ImagePullBackOff indicate?

  1. The container image cannot be pulled
  2. The container exceeded its memory limit
  3. No node has enough CPU
  4. 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.

Select all that apply

Which are common causes of ImagePullBackOff?

  1. A memory limit that is too low
  2. A misspelled image name or tag
  3. The image was never pushed to the registry
  4. Missing credentials for a private registry
  5. 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

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.

Download on the App StoreGet it on Google Play

More KCNA topics in this module