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.
| Setting | When it fits | Trade-off | What to confirm with the CSI driver |
|---|---|---|---|
| volumeBindingMode: WaitForFirstConsumer | Zonal or node-constrained storage where the volume must land near the pod that uses it, which is the usual choice for shared clusters | The PersistentVolumeClaim stays Pending until a pod is scheduled, so pipelines that expect an immediately bound claim may appear stuck | Whether the driver supports topology-aware provisioning and which topology keys it reports |
| volumeBindingMode: Immediate | Single-zone clusters or storage that is not topology-bound, where any node can reach the volume | Volumes may be created in a zone or on a node the scheduler cannot use for the pod, leaving it unschedulable | Whether the backend is reachable from every node, and whether the driver ignores topology hints |
| reclaimPolicy: Retain | Production databases and other data you must recover after a PersistentVolumeClaim is deleted by mistake | The underlying volume and its data remain after deletion and keep consuming capacity until someone removes them manually | Who owns the cleanup runbook, and whether the backend reports released volumes clearly enough to find orphans |
| reclaimPolicy: Delete | Ephemeral, rebuildable or test workloads where automatic cleanup prevents capacity leaks | Deleting a claim also deletes the data, so an accidental removal is not recoverable from the volume itself | Whether the driver honors deletion and whether snapshots or backups exist outside the volume |
| allowVolumeExpansion: true | Workloads whose data grows over time, where resizing a claim without recreating it avoids downtime planning | Expansion usually requires driver and filesystem support, and some drivers only grow volumes without shrinking them | Online versus offline expansion for your filesystem, and whether the pod must restart before the new size appears |
| allowVolumeExpansion: false or unset | Fixed-size volumes or classes where capacity is managed by a separate, controlled process | Teams must create new volumes and migrate data to grow, which is slower and riskier for stateful applications | Whether 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 configuration | Only one class should carry the annotation, and a claim that omits a class silently gets whichever class is default | Which class is default in the cluster now, and whether charts or operators in use set their own storage class |
| provisioner and parameters | Defining the tier for each class, such as replica count, disk type, filesystem or encryption options | Parameters are driver specific and mostly fixed after creation, so changing them usually means creating a new class and migrating | The exact parameter keys the driver accepts, the defaults it applies when a key is absent, and the versioned documentation for your release |
| mountOptions | Filesystem tuning that the driver or node supports, such as options required by a specific workload | Unsupported options can fail mounts on some nodes, and options differ between filesystems and drivers | Which 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.
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.
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.
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.
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.
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.
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.
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.
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
WaitForFirstConsumerso 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
ResourceQuotathat 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.
Stateful production data covers databases, message brokers, document stores and any volume where a deleted claim means lost business records. This tier should be deliberately narrow, reachable only by platform-approved namespaces, and set up so that accidental deletion of a claim does not destroy the underlying volume. The reclaim policy is the central decision: Retain keeps the volume and its data after the claim is removed, which gives operators time to recover but requires a manual cleanup process.
- Reclaim policy: Use
Retainand document who is responsible for releasing or reusing retained volumes. - Binding mode: Use
WaitForFirstConsumerso replicas of a database land in zones that match the anti-affinity rules of the workload. - Expansion: Enable
allowVolumeExpansionso capacity can grow without re-provisioning, and confirm the driver supports online expansion for your filesystem. - Who may request it: Restrict to the platform team or to application owners through an approval step in the deployment pipeline.
- Admission rule: Use a policy engine or a validating admission webhook to require a label or annotation on claims in this class, so requests from unapproved teams fail early.
Confirm that backups and snapshots exist independently of the class, because Retain protects against claim deletion but not against data corruption or a failed disk.
Cost-sensitive data includes large datasets read infrequently, log retention, exports, and older application data that must be kept but seldom accessed. The tier trades performance and sometimes replication for lower cost per gigabyte. Teams often assume this class can be cheap in every respect, but the cost decision depends on the backend. Slower disks or a single replica can reduce spend while increasing the risk that a node failure makes the data temporarily unavailable.
- Reclaim policy: Use
Retainwhen the data has compliance or retention value, andDeleteonly when a retention schedule has already removed its legal need. - Binding mode: Use
WaitForFirstConsumerwhere the backend is zonal, so the volume is not stranded in a zone without capacity. - Who may request it: Allow teams to request this tier directly, but require a justification label that reporting can aggregate.
- Quota: Set a separate storage quota for this class so one team cannot consume a shared pool of slow disks meant for others.
- Price control: Pair the class with a
VolumeAttributesClasspolicy if performance tiers can change later, so expensive upgrades require approval.
Ask the storage team what replica count and latency this class delivers before you describe it to application owners as archival.
A premium performance tier serves latency-sensitive databases and analytics engines that need fast, consistent I/O. It usually sits on the most expensive hardware or the most replicated backend in the cluster, so access control matters more here than anywhere else. The class is defined like the production tier, but the question is less about data loss and more about who can consume scarce capacity and how that capacity is bounded.
- Binding mode: Use
WaitForFirstConsumerso the scheduler can satisfy topology and node selection before the volume is created. - Reclaim policy: Use
Retainfor production databases in this tier andDeletefor short-lived benchmark or staging volumes, using separate classes if both exist. - Quota: Apply a
ResourceQuotakeyed to the class name so each namespace receives an explicit allowance for premium capacity. - Admission rule: Deny premium requests from namespaces that lack an approved label, enforced by Kubernetes admission or a policy engine.
- Change control: Route performance changes through review, because increasing a volume's tier can be as costly as creating a new one.
Confirm with the storage vendor which premium capabilities are available on your hardware before you publish the tier as a catalog option.
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 docsRetain 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.
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 releasesCurrent 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.

