Skip to content
Updated: 6 min read

Kubernetes Storage (Persistent Volumes and StatefulSets): The Most Important Updates

How Persistent Volumes and StatefulSets work in Kubernetes and what has changed in recent releases: PVC retention, VolumeAttributesClass, maxUnavailable, the Recreate strategy and the Unused condition, each with its version and maturity stage taken from the project documentation.

Jakub Malarczyk Author: Jakub Malarczyk

Persistent Volumes keep data alive beyond any single Pod, and StatefulSets give each Pod a stable identity and its own storage. Recent releases have pushed this area forward: PVC retention and volume attributes classes are now stable, and StatefulSet updates have gained new options.

Quick Overview

What you will learn:

  • How PersistentVolumes, PersistentVolumeClaims, StorageClasses and StatefulSets fit together
  • Which storage and StatefulSet features changed maturity stage in recent releases
  • How to check what your own cluster supports

Who this article is for:

  • Cluster administrators and platform engineers
  • Teams running databases, queues or other stateful services on Kubernetes

Reading time: 7 minutes

The Building Blocks

A PersistentVolume (PV) is a piece of storage in the cluster; a PersistentVolumeClaim (PVC) is an application’s request for it. In most clusters PVs are provisioned dynamically: the PVC names a StorageClass and a CSI driver creates the volume in the storage backend.

The StorageClass carries two settings that matter for stateful services. According to the StorageClass documentation on kubernetes.io, reclaimPolicy can be Delete or Retain and defaults to Delete when omitted, so deleting a claim can delete the underlying volume. The volumeBindingMode field defaults to Immediate, which binds or provisions a volume as soon as the PVC exists, without knowing where the Pod will be scheduled. On topology-constrained storage that can leave Pods unschedulable; WaitForFirstConsumer delays binding until a Pod uses the claim, so the scheduler can take all of the Pod’s constraints into account.

For access modes, the PersistentVolume documentation on kubernetes.io lists ReadWriteOncePod as stable since Kubernetes 1.29. It ensures that only one Pod across the whole cluster can read or write the volume, and it works with CSI volumes only. The StatefulSet page recommends it over ReadWriteOnce for production use.

StatefulSets and volumeClaimTemplates

Pods in a StatefulSet are not interchangeable. Each gets a stable name built from an ordinal, such as web-0, and its own storage. The .spec.volumeClaimTemplates field makes the controller create a separate PVC per Pod, and a replacement Pod is matched with the same claim. Under the default OrderedReady Pod management policy, Pods start in order and are removed in reverse order when you scale down, which matters for replicated databases.

What Has Changed Recently

The project maintains release branches for the three most recent minor versions; the releases page on kubernetes.io lists them as 1.37, 1.36 and 1.35. The stages below come from the StatefulSet, Persistent Volumes and Volume Attributes Classes pages and from the Feature Gates table on kubernetes.io, as read in November 2026.

PVC retention for StatefulSets. The .spec.persistentVolumeClaimRetentionPolicy field has two policies, whenDeleted and whenScaled, each set to Retain (the default) or Delete. The Feature Gates table on kubernetes.io shows StatefulSetAutoDeletePVC as alpha in 1.23, beta from 1.27 and stable from 1.32. Before this, claims outlived their StatefulSet and had to be cleaned up by hand.

VolumeAttributesClass. This object describes mutable storage parameters such as IOPS or throughput, as understood by a CSI driver. It has driverName and parameters, and a PVC refers to it through volumeAttributesClassName. Changing that name on an existing claim modifies the volume in place, provided the driver implements the ModifyVolume API; the parameters of an existing class are immutable. Per the Feature Gates table on kubernetes.io: alpha in 1.29, beta from 1.31, stable from 1.34, and from 1.36 the VolumeAttributesClass gate is locked on.

Custom start ordinal. .spec.ordinals.start lets Pods take ordinals from a chosen value rather than zero, up to .spec.ordinals.start + .spec.replicas - 1. The StatefulSet page on kubernetes.io says it first appeared in 1.26 and has been stable since 1.31.

maxUnavailable during rolling updates. .spec.updateStrategy.rollingUpdate.maxUnavailable lets several Pods update at once. The Feature Gates table on kubernetes.io shows MaxUnavailableStatefulSet as alpha from 1.24 to 1.34 and beta from 1.35. It is enabled by default in 1.37 (and was in 1.35.0 to 1.35.3), but it was disabled by default from 1.35.4 and throughout 1.36, so check older clusters before relying on it.

Recreate update strategy. Setting .spec.updateStrategy.type to Recreate deletes every Pod first and only then creates the new ones. You accept downtime, but old and new revisions never run side by side, which suits on-disk formats that change between versions. The StatefulSet page on kubernetes.io marks it alpha since 1.37, behind the StatefulSetRecreateStrategy gate, disabled by default.

The Unused condition on PVCs. The PVC protection controller adds an Unused condition that shows whether any non-terminal Pod references the claim, with lastTransitionTime recording when that changed. It makes forgotten volumes easier to find. The Feature Gates table on kubernetes.io lists PersistentVolumeClaimUnusedSinceTime as alpha in 1.36 and beta, enabled by default, in 1.37.

Checking Your Own Cluster

What you can use depends on the version and configuration of the control plane components, not on your kubectl version. Run kubectl version for the server version, kubectl get storageclass to see binding modes and reclaim policies, and kubectl describe pvc <name> to inspect a claim and its conditions. Alpha features need a gate switched on by the cluster administrator, which many managed services do not allow.

Read Also

Build Your Skills

Hands-on work with storage and StatefulSets is part of Kubernetes from basics to advanced techniques, and administrators heading for the exam can join Certified Kubernetes Administrator (CKA) exam preparation. Get in touch and we will match the scope to your cluster.

Frequently Asked Questions (FAQ)

How does Kubernetes handle data for stateful applications?

It keeps the data on PersistentVolumes that applications request through PersistentVolumeClaims. A StatefulSet creates one claim per Pod from its volumeClaimTemplates and reattaches the same volume when the Pod is replaced. What happens to the data on deletion is decided by the reclaim policy and the PVC retention policy.

Where does persistent storage sit in the Kubernetes architecture?

It is described by API objects: PersistentVolume, PersistentVolumeClaim, StorageClass and VolumeAttributesClass. The actual volumes come from the storage vendor’s CSI driver running in the cluster. Kubernetes matches claims to volumes and attaches them to the nodes where Pods run.

Can you run databases in a StatefulSet when adopting Kubernetes?

Yes, that is what StatefulSets were built for: stable Pod identity, ordered startup and per-Pod volumes. You still need a backup plan, a deliberate PVC retention policy and a chosen update strategy. A StatefulSet does not replace the database’s own replication.

Are the new volume features available on managed Kubernetes in the cloud?

Stable features, and beta features enabled by default, are usually available once your provider offers the matching cluster version. Alpha features need a feature gate that managed services often do not expose. VolumeAttributesClass only works if the provider’s CSI driver supports volume modification.

Jakub Malarczyk
Jakub Malarczyk Opiekun szkolenia

Request a quote

Develop Your Competencies

Check out our training and workshop offerings.

Request Training
Call us +48 22 487 84 90