KCNA Container Orchestration Practice Question
Exhibit
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: app
image: nginx:latest
ports:
- containerPort: 80
- name: sidecar
image: alpine:latest
command: ["sleep", "3600"]Refer to the exhibit. How many containers are defined in this Pod?
⚠ Common exam trap
The trap here is that candidates may miscount containers by including init containers or ephemeral containers, or mistakenly think the number of images referenced equals the number of containers, when the manifest explicitly lists only two containers in the `containers` array.
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
✓
2
The exhibit shows a Pod manifest with two container definitions under the `containers` field: one named `nginx` and one named `sidecar`. In Kubernetes, the number of containers in a Pod is determined by counting the entries in the `spec.containers` list, not including init containers or ephemeral containers unless explicitly specified. Therefore, the correct answer is 2.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
2
Why this is correct
The exhibit lists two distinct container specifications within the Pod's spec.containers array, so the Pod defines two containers. Each entry has its own name and image, and Kubernetes schedules them together in the shared network namespace, confirming the count of two.
- ✗
1
Why it's wrong here
The exhibit's Pod specification lists two entries under the containers array, so one undercounts the defined containers. It is tempting because a Pod commonly runs a single application container, and one would be correct if the manifest declared only one container with no sidecar alongside it.
- ✗
3
Why it's wrong here
The exhibit's containers array contains two entries, so three overcounts the defined containers. It is tempting because Pods frequently run multi-container patterns such as sidecars, adapters and ambassadors, and three would be correct if the manifest listed that many containers.
- ✗
0
Why it's wrong here
The exhibit's Pod manifest declares containers, so zero contradicts the specification. It is tempting because a Pod can legitimately define no containers when it only configures shared volumes, networking or scheduling metadata, but that is not the manifest shown here.
Go deeper
Related to this question
About these practice questions
One of 930 original KCNA 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 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.