CKA Troubleshooting Practice Question
You see events like 'Failed to pull image' when running 'kubectl get events'. Which command can you use to get more detailed information about a specific pod's events?
⚠ Common exam trap
Test-takers frequently confuse 'kubectl logs' (which shows container output) with event inspection, not realizing that a pod that fails to start due to image pull issues never generates container logs, so the error is only visible in the pod's events via 'kubectl describe'.
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>
C is correct because 'kubectl describe pod <pod-name>' provides a detailed summary of the pod's current state, including a chronological list of events related to that specific pod (e.g., image pull failures, container restarts, scheduling issues). This command surfaces the exact error messages and timestamps for each event, making it the most direct way to investigate a 'Failed to pull image' event.
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 get pod <pod-name> -o yaml
Why it's wrong here
While retrieving the Pod definition in YAML format provides comprehensive details about the desired state (spec) and current phase (status), it does not include the real-time cluster event stream. Events are separate API resources in Kubernetes and are not embedded directly within the Pod's resource manifest. To see image pull failures, you must query the events associated with the Pod.
- ✗
kubectl top pod <pod-name>
Why it's wrong here
This command queries the Metrics Server to display real-time CPU and memory utilization for the specified Pod and its containers. It is used for performance monitoring and capacity planning, not for troubleshooting lifecycle states. Because a Pod with an image pull failure cannot transition to a running state, it will not have active resource metrics to display.
- ✓
kubectl describe pod <pod-name>
Why this is correct
This command aggregates detailed information about the Pod from the Kubernetes API, including its configuration, controller references, and container statuses. Crucially, it appends a dedicated "Events" section at the end of the output, which queries the cluster's event log for warnings and errors directly related to that Pod. This is where image pull failures, back-offs, and scheduling issues are explicitly logged.
- ✗
kubectl logs <pod-name>
Why it's wrong here
This command retrieves the standard output (stdout) and standard error (stderr) streams generated by the application running inside the container. If a Pod fails to pull its image, the container never starts, meaning no application process is executed to generate logs. Consequently, running this command will result in an error indicating that the container is not in a running state.
Go deeper
Related to this question
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 →
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.