Bird
0
0

What is the main purpose of using nodeSelector in a Kubernetes Pod specification?

easy📝 Conceptual Q11 of 15
Kubernetes - Scheduling
What is the main purpose of using nodeSelector in a Kubernetes Pod specification?
ATo limit the number of pods running in the cluster
BTo schedule pods only on nodes with specific labels
CTo automatically update pods when nodes change
DTo create a backup of pod data on nodes
Step-by-Step Solution
Solution:
  1. Step 1: Understand nodeSelector role

    The nodeSelector field in a Pod spec is used to specify labels that a node must have for the pod to be scheduled there.
  2. Step 2: Compare options with nodeSelector purpose

    Only To schedule pods only on nodes with specific labels correctly describes this scheduling control. Other options describe unrelated features.
  3. Final Answer:

    To schedule pods only on nodes with specific labels -> Option B
  4. Quick Check:

    nodeSelector = schedule pods on labeled nodes [OK]
Quick Trick: nodeSelector matches pod to node labels for placement [OK]
Common Mistakes:
  • Thinking nodeSelector limits pod count
  • Confusing nodeSelector with pod updates
  • Assuming nodeSelector backs up pod data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes