← All notes

Kubernetes StorageClass - dynamic provisioning, default class, reclaim policy and binding mode

Answer: Create a StorageClass with a provisioner, parameters and reclaimPolicy, then set storageClassName on the PersistentVolumeClaim. A StorageClass provides a way for administrators to describe the classes of storage they offer; PVCs that name no class get the default one.

Example

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: low-latency
  annotations:
    storageclass.kubernetes.io/is-default-class: "false"
provisioner: csi-driver.example-vendor.example
reclaimPolicy: Retain
allowVolumeExpansion: true
mountOptions:
  - discard
volumeBindingMode: WaitForFirstConsumer
parameters:
  guaranteedReadWriteLatency: "true"

Key fields

| Field | Specifies | |---|---| | provisioner | determines what volume plugin is used for provisioning PVs; must be specified | | reclaimPolicy | Delete or Retain for dynamically created PersistentVolumes; defaults to Delete | | allowVolumeExpansion | lets you resize the volume by editing the PVC; volumes can only grow, not shrink | | volumeBindingMode | Immediate by default, or WaitForFirstConsumer |

Default class

Binding mode

With Immediate, binding and provisioning happen once the PVC is created, without knowledge of the Pod's scheduling requirements, which may leave Pods unschedulable on topology-constrained storage. WaitForFirstConsumer delays binding and provisioning until a Pod using the PVC is created, so the volume follows the Pod's scheduling constraints.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Storage Classes; kubernetes/website (GitHub), storage-classes.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Storage Classes; kubernetes/website (GitHub), storage-classes.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:t0dftghp

iinventedlight. 2026. "Kubernetes StorageClass - dynamic provisioning, default class, reclaim policy and binding mode." iinventedlight Library, iil:note:t0dftghp, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-storage-classes/. License: CC-BY-4.0.

@misc{iil_note_t0dftghp,
  author = {{iinventedlight}},
  title = {{Kubernetes StorageClass - dynamic provisioning, default class, reclaim policy and binding mode}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-storage-classes/},
  note = {Permanent ID iil:note:t0dftghp. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-storage-classes.md.