Storage classes
A StorageClass describes a class of storage that administrators offer, and a PVC that names it triggers dynamic provisioning.
A StorageClass describes a class of storage that administrators offer. A PVC that names a storage class triggers dynamic provisioning of a matching PV. The class defines the provisioner, such as a CSI driver, the parameters that the provisioner needs, the reclaim policy, the volume binding mode, and whether volumes can expand.
Key defaults and limits
- The
reclaimPolicyfield defaults toDelete. - The
volumeBindingModefield defaults toImmediate, which provisions a volume as soon as the claim is created.WaitForFirstConsumerdelays binding until a Pod uses the claim, so the volume is created in the right zone. Do not usenodeNamein a Pod that usesWaitForFirstConsumer. - Set
allowVolumeExpansion: trueto allow claims to grow. - To make a class the default, set the annotation
storageclass.kubernetes.io/is-default-classtotrue. - If several classes are marked as default, Kubernetes uses the newest one. Cloudera recommends that you keep only one default class.
- Since Kubernetes 1.28, a default class is also applied retroactively to existing claims that have no class.
For more information, see Storage Classes.
