KCNA Kubernetes Fundamentals Practice Question
Exhibit
Refer to the exhibit. ``` $ kubectl get pods -n production NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 5m web-1 1/1 Running 0 5m web-2 0/1 Pending 0 5m $ kubectl describe pod web-2 -n production ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 5m default-scheduler 0/3 nodes are available: 3 node(s) didn't match pod anti-affinity rules. ```
A StatefulSet named 'web' with 3 replicas is deployed in the 'production' namespace. The first two pods are running, but the third pod 'web-2' is pending with the error shown. What is the most likely cause?
⚠ Common exam trap
The KCNA exam often tests the distinction between resource constraints and scheduling constraints (like anti-affinity), leading candidates to mistakenly choose 'not enough nodes' when the real issue is a rule that prevents using all available nodes.
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 pod anti-affinity rule prevents more than one pod per node, and there are only 3 nodes
The error indicates that the third pod 'web-2' is pending due to a scheduling conflict. Pod anti-affinity rules, when configured with a 'requiredDuringSchedulingIgnoredDuringExecution' policy, prevent more than one pod from the same StatefulSet from being scheduled on the same node. With only 3 nodes available and the first two pods already occupying distinct nodes, the third pod cannot be placed, causing it to remain pending.
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 StatefulSet requires a headless Service that does not exist
Why it's wrong here
A headless Service is not mandatory for scheduling; it is used for DNS.
- ✓
The pod anti-affinity rule prevents more than one pod per node, and there are only 3 nodes
Why this is correct
The scheduler cannot place web-2 because all nodes already have a pod from the same set.
- ✗
The pod has a resource request that cannot be satisfied by any node
Why it's wrong here
The error message explicitly mentions anti-affinity, not resource constraints.
- ✗
There are not enough nodes in the cluster to schedule the third pod
Why it's wrong here
There are exactly 3 nodes, matching the replica count, but anti-affinity blocks placement.
Go deeper
Related to this question
About these practice questions
One of 833 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.