there is a default storage class on the cluster, named local-path. this storage class gets linked to PVCs that do not have explicit storageClassName defined, and it will do 2 things:
- apply volumeBindingMode: WaitForFirstConsumer, which prevents pvc-to-pv binding until first consumer pod is created
- it has a provisioner to create new PVs when no existing PV matches the claim
because of this, my solution to the question was either to explicity set empty storageCLassName on the PVC to prevent local-path class involvement, or to set local-path storage class on PV so it is matched with the PVC (then create the first consumer pod to get the pvc in bound state).
the given solution on lab used something different that I find confusing, it sets storage class on pv and pvc to “manual” (i don’t know from where this “manual” class came)
I want to hear thoughts about which of above three approaches makes more sense and would be suitable for the actual exam