Bird
0
0

Which of the following is the correct syntax to specify a node selector in a Pod spec YAML?

easy📝 Configuration Q3 of 15
Kubernetes - Scheduling
Which of the following is the correct syntax to specify a node selector in a Pod spec YAML?
Anode-selector:\n disktype: ssd
Bnode_selector:\n disktype: ssd
CnodeSelector = {disktype: ssd}
DnodeSelector:\n disktype: ssd
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct YAML key

    The correct key is 'nodeSelector' with camelCase and colon syntax.
  2. Step 2: Check YAML formatting

    YAML uses colon and indentation, not equals or underscores in this context.
  3. Final Answer:

    nodeSelector:\n disktype: ssd -> Option D
  4. Quick Check:

    Correct nodeSelector syntax uses camelCase and colon [OK]
Quick Trick: Use 'nodeSelector:' with proper YAML indentation [OK]
Common Mistakes:
  • Using underscores instead of camelCase
  • Using equals sign instead of colon
  • Incorrect key spelling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes