KCNA Container Orchestration Practice Question
You have a multi-container pod with a main application container and a sidecar container that handles log shipping. The sidecar container should start before the main container and stop after the main container finishes. Which pod configuration should you use?
⚠ Common exam trap
Kubernetes does not have a built-in mechanism to order regular container startup/shutdown; the only ordering is through init containers, which run to completion and cannot serve as long-running sidecars.
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
✓
Kubernetes does not natively guarantee startup and shutdown order among containers in a pod
Kubernetes does not provide any built-in mechanism to control the startup or shutdown order of regular containers within the same pod. All containers in a pod start simultaneously in parallel and terminate independently when the pod is deleted. The only ordering guarantee is that init containers run to completion sequentially before any regular containers start, but they cannot be used for sidecar-style log shipping that must remain running alongside the main 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.
- ✗
Define the sidecar as an init container
Why it's wrong here
Init containers run to completion before app containers start, so the sidecar would stop before the main container starts.
- ✗
Use the 'startupOrder' field in the pod spec
Why it's wrong here
Kubernetes does not have a 'startupOrder' field.
- ✓
Kubernetes does not natively guarantee startup and shutdown order among containers in a pod
Why this is correct
Containers in a pod start in parallel and terminate in parallel; ordering is not guaranteed without custom logic.
- ✗
Set the sidecar container's command to a script that waits for the main container's port to become available before starting
Why it's wrong here
This is a common workaround but not a native Kubernetes feature; it relies on custom scripting.
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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.