This CKA practice question tests your understanding of troubleshooting. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
$ kubectl get pods -n production
NAME READY STATUS RESTARTS AGE
api-6f4d7b9d4c-abcde 0/1 CrashLoopBackOff 5 3m
$ kubectl describe pod api-6f4d7b9d4c-abcde -n production
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m40s default-scheduler Successfully assigned production/api-6f4d7b9d4c-abcde to node-1
Normal Pulled 3m30s kubelet Container image "nginx:1.21" already present on machine
Normal Created 3m30s kubelet Created container api
Normal Started 3m30s kubelet Started container api
Warning BackOff 1s (x5 over 3m) kubelet Back-off restarting failed container
Based on the exhibit, the pod is in CrashLoopBackOff. Which command should you run NEXT to identify the root cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "which command"
Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.
Refer to the exhibit.
$ kubectl get pods -n production
NAME READY STATUS RESTARTS AGE
api-6f4d7b9d4c-abcde 0/1 CrashLoopBackOff 5 3m
$ kubectl describe pod api-6f4d7b9d4c-abcde -n production
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m40s default-scheduler Successfully assigned production/api-6f4d7b9d4c-abcde to node-1
Normal Pulled 3m30s kubelet Container image "nginx:1.21" already present on machine
Normal Created 3m30s kubelet Created container api
Normal Started 3m30s kubelet Started container api
Warning BackOff 1s (x5 over 3m) kubelet Back-off restarting failed container
A
kubectl describe node node-1
Why wrong: Node description doesn't show container crash details.
B
kubectl top pod api-6f4d7b9d4c-abcde -n production
Why wrong: Top shows resource usage, not crash reason.
C
kubectl get deployment api -n production -o yaml
Why wrong: Deployment YAML shows desired state, not current error.
D
kubectl logs api-6f4d7b9d4c-abcde -n production --previous
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
kubectl logs api-6f4d7b9d4c-abcde -n production --previous
The pod is in CrashLoopBackOff, which means the container starts, crashes, and restarts repeatedly. The `kubectl logs --previous` command retrieves the logs from the previous (crashed) container instance, which is the fastest way to see the error that caused the crash. This directly reveals the root cause, such as a missing dependency, configuration error, or application panic.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 describe node node-1
Why it's wrong here
Node description doesn't show container crash details.
✗
kubectl top pod api-6f4d7b9d4c-abcde -n production
Why it's wrong here
Top shows resource usage, not crash reason.
✗
kubectl get deployment api -n production -o yaml
Why it's wrong here
Deployment YAML shows desired state, not current error.
✓
kubectl logs api-6f4d7b9d4c-abcde -n production --previous
Why this is correct
Shows logs from the crashed container instance.
Clue confirmation
The clue word "which command" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may think `kubectl describe pod` or `kubectl get deployment` is needed to check the pod's status or configuration, but the fastest way to see the crash reason is the previous container's logs, not the current (restarted) container's logs which may be empty.
Trap categories for this question
Command / output trap
Node description doesn't show container crash details.
Detailed technical explanation
How to think about this question
CrashLoopBackOff is a Kubernetes pod status that occurs when a container exits with a non-zero exit code and the restart policy is Always or OnFailure. The kubelet backs off exponentially (10s, 20s, 40s, etc.) between restarts. Using `kubectl logs --previous` retrieves the stdout/stderr from the terminated container, which often contains the exact error message (e.g., 'connection refused', 'file not found') that caused the crash, making it the first diagnostic step in practice.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the CKA exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this CKA question in full detail.
Troubleshooting — This question tests Troubleshooting — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: kubectl logs api-6f4d7b9d4c-abcde -n production --previous — The pod is in CrashLoopBackOff, which means the container starts, crashes, and restarts repeatedly. The `kubectl logs --previous` command retrieves the logs from the previous (crashed) container instance, which is the fastest way to see the error that caused the crash. This directly reveals the root cause, such as a missing dependency, configuration error, or application panic.
What should I do if I get this CKA question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.