Kubernetes StorageClass design: binding modes, reclaim policy and expansion

A practical guide to designing Kubernetes StorageClasses for a shared cluster: when to use WaitForFirstConsumer, when production data should use Retain, how expansion and default classes behave, and how to offer per-team tiers.

On this page

Kubernetes StorageClass design starts with the data each team will store

A StorageClass tells Kubernetes how to create persistent volumes on demand when a team files a PersistentVolumeClaim, and on a shared cluster the platform team owns every one of those decisions: which storage backend answers, when the volume is provisioned, what happens to the data when the claim is deleted, and whether the volume can grow later. The binding mode, the reclaim policy, the expansion setting and the default class are the four controls that matter most, and each is set once on the class, then inherited silently by every claim that uses it. A single default class is enough only when every workload has the same tolerance for data loss, the same performance needs and the same placement rules. That is rarely true once databases, message brokers, build caches and scratch space share one cluster.

Start from the data, not from the storage product. For each team or workload family, record how much the data matters if it is lost, how long it must be kept, whether it must stay in a particular zone or region, what latency and throughput it needs, and whether it can be rebuilt from elsewhere. A cache that can be recreated, a primary database that needs replicated volumes and a compliance archive with a retention rule call for three different answers to the reclaim and backup questions. Ask each team which of these they can state today, and ask the storage owner which of them the backend can actually honor, because the class is only as strong as the driver behind it.

Once the data profile is written down, group it into a small number of tiers that teams can request by name, and make the tier decision a platform decision rather than a per-team preference. Confirm with your storage driver's documentation which parameters each tier can use, and check that your cluster's storage provider supports the features you plan to promise, such as expansion and snapshots, before you publish the tier. Illustrative example: a team asks for a fast tier for a database, but the backend cannot expand volumes online, so the tier promise must be written around that limit from the start.

Which StorageClass settings fit which workload

This table compares the StorageClass settings that shape placement, data safety, growth and team access. Read each row as a question: when does this setting fit, what does it cost you, and what must you confirm with your CSI driver before relying on it.

SettingWhen it fitsTrade-offWhat to confirm with the CSI driver
volumeBindingMode: WaitForFirstConsumerZonal or node-constrained storage where the volume must land near the pod that uses it, which is the usual choice for shared clustersThe PersistentVolumeClaim stays Pending until a pod is scheduled, so pipelines that expect an immediately bound claim may appear stuckWhether the driver supports topology-aware provisioning and which topology keys it reports
volumeBindingMode: ImmediateSingle-zone clusters or storage that is not topology-bound, where any node can reach the volumeVolumes may be created in a zone or on a node the scheduler cannot use for the pod, leaving it unschedulableWhether the backend is reachable from every node, and whether the driver ignores topology hints
reclaimPolicy: RetainProduction databases and other data you must recover after a PersistentVolumeClaim is deleted by mistakeThe underlying volume and its data remain after deletion and keep consuming capacity until someone removes them manuallyWho owns the cleanup runbook, and whether the backend reports released volumes clearly enough to find orphans
reclaimPolicy: DeleteEphemeral, rebuildable or test workloads where automatic cleanup prevents capacity leaksDeleting a claim also deletes the data, so an accidental removal is not recoverable from the volume itselfWhether the driver honors deletion and whether snapshots or backups exist outside the volume
allowVolumeExpansion: trueWorkloads whose data grows over time, where resizing a claim without recreating it avoids downtime planningExpansion usually requires driver and filesystem support, and some drivers only grow volumes without shrinking themOnline versus offline expansion for your filesystem, and whether the pod must restart before the new size appears
allowVolumeExpansion: false or unsetFixed-size volumes or classes where capacity is managed by a separate, controlled processTeams must create new volumes and migrate data to grow, which is slower and riskier for stateful applicationsWhether the class default changed in your Kubernetes version and whether a later patch needs to be applied
Default class annotation (storageclass.kubernetes.io/is-default-class)One class that serves most claims that do not name a class, so simple applications work without configurationOnly one class should carry the annotation, and a claim that omits a class silently gets whichever class is defaultWhich class is default in the cluster now, and whether charts or operators in use set their own storage class
provisioner and parametersDefining the tier for each class, such as replica count, disk type, filesystem or encryption optionsParameters are driver specific and mostly fixed after creation, so changing them usually means creating a new class and migratingThe exact parameter keys the driver accepts, the defaults it applies when a key is absent, and the versioned documentation for your release
mountOptionsFilesystem tuning that the driver or node supports, such as options required by a specific workloadUnsupported options can fail mounts on some nodes, and options differ between filesystems and driversWhich options the driver and node operating system accept, and how to test them on a representative node first

How to build a StorageClass set for a shared cluster

This sequence turns a shared cluster's mix of workload data needs into a small set of StorageClasses with deliberate binding, reclaim, expansion and default choices, each proven with a test claim before teams use it.

  1. Inventory workload data tiers

    Platform engineering works with application owners to list every workload that needs persistent volumes and sort them into tiers, such as disposable scratch data, standard application state and production data that must survive an accidental delete. For each tier, record the required access mode, expected growth, whether the application replicates its own data, and the recovery expectation the owner has agreed to. The output is a short table with one row per tier. Done means every stateful workload in the cluster maps to exactly one tier, and the owners have signed off on the tier descriptions.

  2. Confirm driver topology and expansion support

    Check the CSI driver installed in the cluster for two things: whether it exposes topology keys so the scheduler can place volumes in the same zone as the pod, and whether it supports volume expansion. Read the driver's documentation for the exact capabilities of your version and confirm them with the vendor or project if the documentation is unclear. Then inspect the installed CSIDriver object and the driver's controller and node deployments to verify what is actually running, not only what is documented. Done means you have a written list of supported binding behavior and expansion behavior per driver, and any gaps are recorded as decisions for the next steps.

  3. Define one class per tier

    For each tier, create a StorageClass that names the provisioner and parameters from the confirmed driver. Set volumeBindingMode to WaitForFirstConsumer for classes backed by zonal or node-local storage, so the volume is created where the pod is scheduled. Set reclaimPolicy to Retain for production data tiers, so deleting a claim leaves the underlying volume for review, and Delete for scratch tiers where data loss is acceptable. Set allowVolumeExpansion to true only where step two confirmed support. Done means each class manifest is stored in version control and reviewed, with the binding mode, reclaim policy and expansion setting visible in the file.

  4. Set a single default class with a rationale

    Choose one StorageClass to carry the storageclass.kubernetes.io/is-default-class annotation, and document why that tier is the default. A common rationale is the standard tier, since claims that omit a class then get reasonable behavior. Confirm that no other class is marked as default, because more than one default causes claims to be rejected or assigned unpredictably depending on the cluster's admission behavior, and verify this with a listing of all classes. Done means exactly one class reports as default in kubectl output, and the rationale is recorded next to the class manifest for the platform team and application owners.

  5. Verify WaitForFirstConsumer placement

    In a non-production namespace, create a PersistentVolumeClaim against a WaitForFirstConsumer class without starting a pod. Confirm the claim stays in the Pending state, with an event indicating it is waiting for the first consumer. Then create a pod that mounts the claim and confirm the pod is scheduled, the claim becomes Bound, and the volume's topology matches the node the pod landed on. Repeat once with a pod pinned to a different zone if your cluster has multiple zones. Done means the Pending-then-Bound sequence and zone match are recorded for each zonal class.

  6. Test reclaim behavior on each class

    For each class, create a claim, write a known marker file through a test pod, then delete the pod and the claim. For Retain classes, confirm the PersistentVolume moves to the Released state and the backing volume still exists in the storage backend, and document the manual steps needed to reuse or remove it. For Delete classes, confirm the PersistentVolume and backing volume are removed after the claim is deleted. Done means each class has a recorded result showing the observed reclaim outcome, and the cleanup procedure for Released volumes is written into the runbook.

  7. Test volume expansion on expandable classes

    For each class with allowVolumeExpansion set to true, create a claim with a small request, attach it to a test pod, write data, then edit the claim to request a larger size. Confirm the PersistentVolumeClaim shows the resize condition, the filesystem inside the pod grows, and the existing data is intact. Also confirm that a class without expansion rejects a larger request, so the setting behaves as documented. Done means each expandable class has a recorded resize result, and any driver-specific steps that the pod restart or node-side resize requires are noted in the runbook.

  8. Publish classes and review access

    Apply the reviewed StorageClasses to the shared cluster through the same GitOps or change process used for other cluster configuration. Decide which teams may request the premium or production tiers, and restrict those classes with RBAC or an admission policy so teams cannot select them by default. Record the tier table, default class, binding and reclaim settings, and test evidence in the platform documentation. Done means the classes are live, access to restricted tiers has been tested with a user who should not have it, and the owners know which class to choose for each workload.

Per-tier classes for teams with different data needs

Application scratch data includes build caches, temporary processing files, test databases and anything the owning team can regenerate. For this tier, losing a volume is an inconvenience rather than an incident, so the class favors simplicity and cleanup. A WaitForFirstConsumer binding mode is usually still worth using so the volume lands in the zone where the pod is scheduled, and the reclaim policy is typically Delete so that finished jobs do not leave orphaned volumes behind.

  • Binding mode: Use WaitForFirstConsumer so the scheduler picks the zone and node before the volume is provisioned.
  • Reclaim policy: Use Delete, since the data is disposable and storage should return to the pool when claims are removed.
  • Who may request it: Any namespace owner with a quota can use this class, which keeps onboarding friction low.
  • Restriction: Cap total requested capacity per namespace with a ResourceQuota that counts storage requests for this class.
  • Default status: This is a reasonable candidate for the cluster default class, but only if the production tier requires explicit selection.

Confirm with your storage driver whether it supports the expansion and snapshot features your teams expect for scratch workloads, because those features are not uniform across drivers.

How a claim moves from request to bound volume

The path starts when a workload creates a PersistentVolumeClaim that names a StorageClass. The binding mode decides the next step: with Immediate, the CSI provisioner creates the volume at once, possibly in a zone where the pod never runs; with WaitForFirstConsumer, the claim waits until the scheduler picks a node, and the driver provisions inside that node's topology. Check the binding mode, the topology the driver reports, and the reclaim policy before the first claim is made, since the reclaim policy decides what happens to the data when the claim is deleted.

Decision path from claim creation to bound volume and reclaim.

Risks that a poor StorageClass design creates

StorageClasses decide where volumes land, what happens to data when a claim disappears, who can buy premium storage and how volumes can grow. A weak choice in any one of these areas tends to surface later as lost data, orphaned spend or an unplanned change to a shared cluster.

Delete reclaim removes production data

With the Delete reclaim policy, deleting a PersistentVolumeClaim also deletes the underlying volume and its data. Teams often delete claims during cleanup, redeploys or Helm uninstalls without realizing the volume goes with them. Set production tiers to Retain and restrict who can delete claims in production namespaces through RBAC. Confirm the policy on each PersistentVolume before any cleanup job runs.

StorageClass docs

Retain leaves orphaned volumes

Retain keeps the data but releases the volume into a Released state that no claim can bind to automatically. Those volumes keep consuming capacity and may hold sensitive data long after the application is gone. Assign an owner label to each class, review Released volumes on a schedule and document the steps for reclaiming or wiping them. Ask your storage vendor how it bills or reports unbound volumes.

Unrestricted access to premium tiers

If every namespace can reference any StorageClass, a single team can request expensive NVMe-backed or replicated tiers for workloads that do not need them. Limit expensive classes with RBAC on the StorageClass name, or with a policy engine that checks claims at admission. Pair the restriction with ResourceQuota on requests.storage per namespace so capacity requests stay within an agreed budget.

Unintended default class captures claims

A StorageClass annotated as default receives every PersistentVolumeClaim that omits a storageClassName. If a cheap or unreplicated class is marked default by mistake, databases and stateful apps can land on storage that lacks the durability they assume. Keep exactly one default class, check the storageclass.kubernetes.io/is-default-class annotation during each cluster change and require explicit class names in production manifests.

Expansion that cannot be reversed

Enabling allowVolumeExpansion lets users grow a PVC, but a volume cannot be shrunk through the same path. An oversized request can therefore lock in higher cost and make the volume harder to move. Confirm that the CSI driver supports online expansion, decide which tiers allow growth and set a review step for large increases. Test the expansion path in a non-production cluster before enabling it on shared classes.

Encryption and access differ by class

Two classes backed by the same vendor can differ in encryption at rest, replication, access modes or mount options. Without review, a team may pick a class that stores data unencrypted or allows ReadWriteMany where the application expects exclusive access. Record each class's encryption setting, access modes and parameters in a catalog, and require security sign-off before a new class is added to a shared cluster.

Questions teams ask before designing StorageClasses

Can our own team design StorageClasses without a partner?

Yes, many teams do, provided someone on the team understands how the storage driver provisions volumes and how the scheduler places pods. The design itself is a small set of objects: a provisioner, parameters, a volumeBindingMode, a reclaimPolicy, and an allowVolumeExpansion setting. The harder part is knowing which values match your storage backend and your data. A partner adds value when the cluster is shared across many teams, when existing volumes must be migrated to new classes, or when your team wants the design reviewed against its own recovery and approval rules. Decide early which parts your team owns and which need outside review.

What makes StorageClass design take more or less effort?

Four factors shape the work most. Driver support matters first, because binding modes, expansion and snapshot behavior depend on the CSI driver you run. The number of tiers matters next, since each tier needs its own class, parameters, documented use and access rules. Existing data matters a great deal: changing the default or reclaim behavior does not rewrite volumes that already exist, so migration work can dominate. The number of teams sets how much policy, quota and onboarding material you need. Ask any provider to break its effort down along these four factors in the written scope.

What do we need to provide before design work starts?

Expect to supply a storage inventory, the chosen CSI driver and its version, cluster access for the people doing the work, and a named approver for reclaim policy decisions. The inventory should list existing StorageClasses, PersistentVolumes, which workloads use them, their size, and their recovery expectations. Reclaim policy needs a business owner's sign-off because Delete removes the underlying volume when the claim is removed, while Retain keeps it for manual handling. Also confirm which backups exist outside the cluster, such as Velero or driver-level snapshots, because those define what a Delete mistake costs.

How long does a StorageClass design engagement take?

Duration depends on scope rather than on a fixed formula. A single cluster with one driver and two or three tiers, and no existing data to migrate, is a short design exercise. A multi-cluster estate with several drivers, legacy volumes, and team-specific tiers takes longer because each class needs testing against each driver and workload. Your timeline should follow the written scope, which lists deliverables and test steps. Ask for the milestones, what each one produces, and which items depend on your approvals or access.

Can we change an existing default StorageClass safely?

You can change the default, but the change affects new claims only. Existing PersistentVolumeClaims keep the class they were created with, and the default annotation only applies when a claim omits a class. Before changing it, list every workload that relies on implicit defaults, since some manifests and Helm charts omit storageClassName. Test the new default on a non-production cluster, confirm that WaitForFirstConsumer binding is correct for the zones you run, and check that the old default is not also marked as default, because two defaults cause unpredictable provisioning. Plan a rollback path and announce the change to teams.

Can we shrink a volume after a StorageClass allows expansion?

No, not with the standard expansion path. When allowVolumeExpansion is enabled, a PersistentVolumeClaim can be grown by editing its requested size, provided the CSI driver supports resize. The Kubernetes storage documentation describes expansion as increase only. If you need a smaller volume, the usual approach is to create a new claim at the target size, copy the data while the application is stopped or quiesced, and switch the workload over. Confirm the exact resize behavior, including whether the filesystem resizes online, with your driver's documentation before you promise a maintenance window.

How does WaitForFirstConsumer affect zone placement?

With WaitForFirstConsumer, the volume is not provisioned until a pod using its claim is scheduled, so the storage can be created in the same zone as the node the pod landed on. With the Immediate mode, the volume may be created in a zone where the scheduler then cannot run the pod, which leaves the pod pending. For multi-zone clusters this is usually the safer default. Confirm that your driver honors topology, that node labels for zones are correct, and that your workloads do not require a volume in a zone that the scheduler cannot satisfy. Test a pod restart in each zone before relying on the setting.

What to confirm in your environment before you commit

Most StorageClass decisions depend on facts about your storage backend and cluster that no design document can settle for you. Confirm the items below with your storage vendor or from your own environment before you approve the class design. Each one changes which binding mode, reclaim policy and expansion setting is safe to use.

CSI driver topology and expansion support

Ask whether your CSI driver honors topology-aware provisioning, so that WaitForFirstConsumer can place a volume in the zone where its pod is scheduled. Also confirm whether it supports online volume expansion for the filesystem types you use. If expansion is unsupported, allowVolumeExpansion set to true will not help, and the team needs a different resizing plan before any production class is approved.

StorageClass docs

Snapshot support for backups

Confirm whether the driver supports VolumeSnapshot objects and whether a matching VolumeSnapshotClass is available in your cluster. Snapshots are often the recovery path that makes a Delete reclaim policy acceptable for data that is not otherwise backed up. If the driver cannot snapshot, plan for a backup tool that reads data through the application or the file system instead.

Kubernetes version and support window

Check which minor version your clusters run and whether it is still in the upstream support window. Storage behavior, including the handling of volume expansion and topology features, can differ between releases and between CSI sidecar versions. Pin the version you test against and confirm the driver publishes compatibility for it.

Kubernetes releases

Current default class and existing claims

List the StorageClass marked as default and every PersistentVolumeClaim that relies on it without naming a class. Changing the default or the binding mode does not rewrite existing claims, but new claims created without a class will follow the new default. Confirm which workloads depend on implicit selection before you change anything.

Reclaim policy and backup alignment

For each workload tier, confirm where the authoritative copy of the data lives and how it is restored. A Retain policy keeps the volume after its claim is deleted, which means someone must clean it up, and a Delete policy removes the data along with the claim. Match the choice to a tested backup or restore path, and confirm that the restore procedure has been run recently.

Change approval for production classes

Identify who owns the production StorageClasses, who may create or edit them, and how changes are reviewed. StorageClass parameters are largely immutable after creation, so a change usually means creating a new class and migrating claims. Agree on that process, the approver and the rollback path in writing before teams start requesting their own tiers.

How DeployOpen works on this

DeployOpen plans and implements Kubernetes StorageClass design inside your own clusters and infrastructure, starting from the workloads that will consume storage. The work covers binding modes, reclaim policy, expansion and per-tier classes, documented so your platform and application teams can run them after handover.

How we scope

  • We inventory stateful workloads, their data sensitivity and the storage tiers your teams actually need.
  • We agree in writing which storage backends, StorageClasses and default class rules are in scope before work starts.
  • Engagements are fixed-scope, so deliverables, acceptance tests and timelines are confirmed in the written scope.

How we build

  • We define StorageClasses with WaitForFirstConsumer where zone-aware placement matters, and test pod scheduling across zones.
  • We set Retain or Delete reclaim policies per tier, with an explicit review of which production data must survive PVC deletion.
  • We enable and test volume expansion, confirm that your CSI driver supports it, and document the filesystem resize steps.

How we hand over

  • You receive manifests in your Git repository, with a runbook for choosing the right class for each workload.
  • Handover includes a written test record showing binding, reclaim and expansion behavior on your own cluster.
  • We document who may create or select expensive tiers, and how default class changes are reviewed before rollout.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • We can review new StorageClasses and driver upgrades against the documented design before they reach production.
  • Ask any provider to confirm which driver versions and Kubernetes versions their testing covers in your environment.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.