hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A Kubernetes pod has a container that fails with…
A Kubernetes pod has a container that fails with CrashLoopBackOff. The administrator runs 'kubectl logs pod-name' but sees no output. What is the most likely cause?
⚠ Common exam trap
Watch out — candidates often assume 'no output' means logs are missing or misconfigured, when in fact the current container simply hasn't written anything yet, and the previous container's logs are still available via --previous.
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
✓
The container exited before writing to stdout, and logs need to be retrieved with 'kubectl logs --previous'.
When a container enters CrashLoopBackOff, it restarts repeatedly. If 'kubectl logs pod-name' shows no output, it means the current (restarted) container has not written anything to stdout yet. The previous instance of the container may have written logs before crashing, and those logs are accessible using 'kubectl logs --previous' to retrieve the output from the terminated container.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The container exited before writing to stdout, and logs need to be retrieved with 'kubectl logs --previous'.
Why this is correct
Correct: use --previous to see previous container logs.
- ✗
The container has no logging driver configured.
Why it's wrong here
Kubernetes uses Docker's logging; it logs by default.
- ✗
The log file is rotated and deleted.
Why it's wrong here
Log rotation does not cause empty logs on first fetch.
- ✗
The pod is not scheduled on any node.
Why it's wrong here
Would show Pending status, not CrashLoopBackOff.
Go deeper
Related to this question
About these practice questions
This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.