storageClassName
in PersistentVolume
although not exists corresponding StorageClass
in the cluster?StorageClass
with name = X, pre-defined PersistentVolume
with storageClassName
= X, PersistentVolumeClaim
with storageClassName
= X. In this case the cluster will try bind the PVC to the existing PV and dynamic provisioning will happen only if the PV is not available?From the docs
When none of the static PVs the administrator created match a user’s PersistentVolumeClaim, the cluster may try to dynamically provision a volume specially for the PVC. This provisioning is based on StorageClasses: the PVC must request a storage class and the administrator must have created and configured that class for dynamic provisioning to occur.
storageClassName
in the PV. There is no requirement for the storage class to exist in the cluster when the provisioning is not dynamic.storageClassName
.