Kubernetes - Persistent StorageWhy 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 existsBTo allow the PV to be accessed by any node in the clusterCTo specify the storage capacity of the PVDTo define the access mode of the PVCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand local storage natureLocal storage physically exists on a specific node, so PV must be tied to that node.Step 2: Role of nodeAffinity in PVnodeAffinity restricts PV binding to the node hosting the local storage, preventing scheduling errors.Final Answer:To ensure the PV is bound to a specific node where the local storage exists -> Option AQuick 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 accessConfusing nodeAffinity with capacity or access modeIgnoring node binding requirement for local storage
Master "Persistent Storage" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes ConfigMaps - Why configuration separation matters - Quiz 7medium ConfigMaps - Creating ConfigMaps from literals - Quiz 2easy ConfigMaps - Why configuration separation matters - Quiz 6medium Ingress - Why Ingress manages external access - Quiz 2easy Persistent Storage - Access modes (ReadWriteOnce, ReadOnlyMany, ReadWriteMany) - Quiz 12easy Resource Management - Cluster Autoscaler concept - Quiz 15hard Resource Management - CPU requests and limits - Quiz 12easy Scheduling - Pod affinity and anti-affinity - Quiz 10hard Scheduling - DaemonSets for per-node workloads - Quiz 8hard Scheduling - Pod priority and preemption - Quiz 5medium