StorageClass

StorageClasses represent tiers/classes of storage, enabling dynamic PersistentVolume provisioning by defining infrastructure-specific parameters required for provisioning. They also template their PVs' reclaim policies.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
    name:
parameters:
    kind: Managed
    storageaccounttype: Premium_GRS
provisioner: kubernetes.io/azure-disk

Note that StorageClasses are immutable once created, and changes to their specification will require deletion.

Default StorageClass

The default StorageClass will be used to provision PVs for PVCs whose specifications don't specify a storageClassName. It can be configured by moving the storageclass.kubernetes.io/is-default-class: true annotation.

Block volumes

volumeMode: block allows access to raw, unformatted block volumes whose paths can be set in a volumeMount using the devicePath option.

Clones

dataSource allows specifying a source PVC to clone.


Backlinks