Bird
0
0

You wrote this Pod spec:

medium📝 Troubleshoot Q14 of 15
Kubernetes - Scheduling
You wrote this Pod spec:
spec:
  nodeSelector:
    disk-type: ssd
But your nodes have label disktype=ssd (no dash). What will happen when you try to schedule the Pod?
APod will remain pending, no matching nodes found
BPod will schedule on nodes with label disktype=ssd
CPod will schedule on nodes with label disk-type=ssd
DPod will schedule on any available node
Step-by-Step Solution
Solution:
  1. Step 1: Compare nodeSelector key with node labels

    The pod requests nodes with label disk-type=ssd, but nodes have disktype=ssd. The keys differ by a dash.
  2. Step 2: Understand label matching behavior

    Labels must match exactly. Since no node has disk-type=ssd, pod cannot be scheduled.
  3. Final Answer:

    Pod will remain pending, no matching nodes found -> Option A
  4. Quick Check:

    Label keys must match exactly for nodeSelector [OK]
Quick Trick: Label keys must match exactly, including dashes [OK]
Common Mistakes:
  • Assuming partial key match works
  • Thinking pod schedules on any node if no match
  • Confusing label key spelling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes