Bird
0
0

Why is nodeAffinity required in a PersistentVolume definition that uses local storage?

hard📝 Conceptual Q10 of 15
Kubernetes - Persistent Storage
Why is nodeAffinity required in a PersistentVolume definition that uses local storage?
ATo ensure the PV is bound to a specific node where the local storage exists
BTo allow the PV to be accessed by any node in the cluster
CTo specify the storage capacity of the PV
DTo define the access mode of the PV
Step-by-Step Solution
Solution:
  1. Step 1: Understand local storage nature

    Local storage physically exists on a specific node, so PV must be tied to that node.
  2. Step 2: Role of nodeAffinity in PV

    nodeAffinity restricts PV binding to the node hosting the local storage, preventing scheduling errors.
  3. Final Answer:

    To ensure the PV is bound to a specific node where the local storage exists -> Option A
  4. Quick Check:

    Local PV requires nodeAffinity for node binding [OK]
Quick Trick: Local PV must bind to node with storage via nodeAffinity [OK]
Common Mistakes:
  • Thinking nodeAffinity allows cluster-wide access
  • Confusing nodeAffinity with capacity or access mode
  • Ignoring node binding requirement for local storage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes