Courseiva
Troubleshooting →mediumMultiple Choice

CKA Troubleshooting Practice Question

A pod is in ImagePullBackOff state. Which command is MOST useful to diagnose the issue?

⚠ Common exam trap

Watch out — candidates often assume `kubectl logs` is the universal diagnostic tool, but it fails for pre-start states like ImagePullBackOff, where the container never runs to produce logs.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

kubectl describe pod <pod-name>

`kubectl describe pod <pod-name>` provides detailed pod status, including the exact reason for ImagePullBackOff (e.g., invalid image name, registry authentication failure, or network issues). It surfaces the underlying error message from the kubelet, such as 'Failed to pull image' or 'manifest not found', which directly points to the root cause.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    kubectl logs <pod-name>

    Why it's wrong here

    kubectl logs is not effective for an ImagePullBackOff pod because the container image was never successfully pulled, so the container was never created or started and there is no application stdout/stderr to read. Image pull failures are emitted by the kubelet and container runtime, not captured in container logs; the logs command would simply report that the container is waiting to start or return an error instead of diagnosing why the image could not be fetched.

  • ✗

    kubectl exec <pod-name> -- ls

    Why it's wrong here

    kubectl exec requires a running container in which to execute a command. In the ImagePullBackOff state, the pod is stuck in a pending/container-creating phase because the kubelet cannot pull the image, so there is no container process available for exec; the command would fail with an error such as 'cannot exec into a container: container not running'. Executing 'ls' inside the container would not expose kubelet-side image registry authentication or manifest resolution issues.

  • ✗

    kubectl get events --field-selector type=Warning

    Why it's wrong here

    kubectl get events --field-selector type=Warning can show ImagePullBackOff-related warning events, but it is not the most useful command for this scenario because it indiscriminately lists warning events from the entire namespace, not just the target pod, and it omits the consolidated pod status, container states, and conditions that are necessary for a complete diagnosis. The describe command, by contrast, scopes events to the specific pod and pairs them with the exact image name, container port, restart policy, and the full status block in one view.

  • ✓

    kubectl describe pod <pod-name>

    Why this is correct

    kubectl describe pod is the correct and most useful command because it displays the pod's complete status, conditions, container states, and recent events in one place, including the exact kubelet-generated error from the failed image pull. This output reveals crucial details such as the image name/tag, whether the registry returned a 'manifest unknown' error, an authentication failure, or a network issue, and shows the exponential backoff timing, enabling a precise root-cause diagnosis.

About these practice questions

One of 726 original CKA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.