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 reclaimPolicy field defaults to Delete.
  • The volumeBindingMode field defaults to Immediate, which provisions a volume as soon as the claim is created. WaitForFirstConsumer delays binding until a Pod uses the claim, so the volume is created in the right zone. Do not use nodeName in a Pod that uses WaitForFirstConsumer.
  • Set allowVolumeExpansion: true to allow claims to grow.
  • To make a class the default, set the annotation storageclass.kubernetes.io/is-default-class to true.
  • 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.