PVCs and StorageClasses: A PVC can request a specific StorageClass using the storageClassName
attribute. If omitted (storageClassName: ""
) or left unspecified and there is no default StorageClass configured in the cluster, the PVC can only be bound to PVs that also have no storageClassName
set (storageClassName: ""
).
Selectors: A PVC can specify a selector
to further filter the set of potential PVs it can bind to. The selector matches labels on the PVs.
Binding Process: Kubernetes tries to find a suitable PV that matches the PVC's requirements (AccessModes, VolumeMode, Size, StorageClass, Selector, optional VolumeName).
In this specific situation, the Kubernetes control plane will evaluate the PVC. Since it has no storageClassName
and there's no default, it looks for pre-provisioned PVs. The selector
provides specific criteria. Because a PV exists that matches the selector (and implicitly other requirements like size, access modes, and having no storageClassName
), Kubernetes will successfully bind the PVC to that existing PV. The binding mechanism prioritizes fulfilling the claim with an existing volume if possible and if the criteria match, even without a StorageClass involved directly in the PVC or as a default.