KCNA Kubernetes Fundamentals Practice Question
A developer creates a Pod with two containers. The first container writes logs every 30 seconds to a shared volume. The second container reads those logs. After deployment, the second container fails to start because it cannot find the log file. The Pod spec uses an emptyDir volume mounted at /var/logs in both containers. What is the most likely cause?
⚠ Common exam trap
The trap here is assuming that containers in a Pod start sequentially, with the first container completing its initial work before the second starts.
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 second container starts before the first container writes any logs, and it exits because the file does not exist.
Containers within a Pod start simultaneously without guaranteed ordering. When one container depends on a file created by another, the reader may start first and fail. This race condition is best solved by using an init container that waits for the file, or by making the reader container resilient to the file's absence.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
emptyDir volumes are not shared between containers in the same Pod; each container gets its own isolated volume.
Why it's wrong here
emptyDir volumes are explicitly designed to be shared across all containers within the same Pod. They are created when the Pod is assigned to a node and exist for the Pod's lifetime. This is a common misconception, but it does not explain the failure.
- ✗
The Pod's restartPolicy is set to Never, so the second container will not restart after failing.
Why it's wrong here
restartPolicy affects the entire Pod, not individual containers. Even if set to Never, the initial startup failure is due to the missing file, not the restart policy. The policy would only matter for subsequent restarts, not the first attempt.
- ✓
The second container starts before the first container writes any logs, and it exits because the file does not exist.
Why this is correct
Containers in a Pod start concurrently, not sequentially. The reader container may start before the writer has created the log file, causing a failure if it expects the file to exist immediately. Using an init container or a retry loop would resolve this race condition.
- ✗
The second container lacks the necessary permissions to read files written by the first container.
Why it's wrong here
Containers in the same Pod share the same volume and typically run as the same user unless securityContext is configured otherwise. While permissions could be an issue, it is less likely than a startup ordering race, especially when no securityContext is mentioned.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 930-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CNCF exam blueprint
This KCNA 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 KCNA exam.