Bird
0
0

Given a Pod with a nodeSelector for label zone: us-east, what will happen if no nodes have this label?

medium📝 Command Output Q4 of 15
Kubernetes - Scheduling
Given a Pod with a nodeSelector for label zone: us-east, what will happen if no nodes have this label?
AThe Pod will be scheduled on a node with a different label
BThe Pod will remain in Pending state indefinitely
CThe Pod will be deleted automatically
DThe Pod will be scheduled on any available node
Step-by-Step Solution
Solution:
  1. Step 1: Understand nodeSelector behavior

    nodeSelector requires matching node labels; if none match, Pod cannot be scheduled.
  2. Step 2: Check Pod lifecycle

    Without a matching node, the Pod stays Pending until a suitable node appears.
  3. Final Answer:

    The Pod will remain in Pending state indefinitely -> Option B
  4. Quick Check:

    nodeSelector mismatch = Pod Pending [OK]
Quick Trick: Pod waits Pending if no node matches nodeSelector [OK]
Common Mistakes:
  • Assuming Pod schedules anywhere without matching label
  • Thinking Pod auto-deletes on no match
  • Believing scheduler ignores nodeSelector

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes