PersistentVolume (PV) and PersistentVolumeClaim (PVC) are Kubernetes abstractions that separate storage provisioning from storage consumption. They allow pods to request and use persistent storage without knowing the details of the underlying infrastructure. This model enables portable, declarative storage management across cloud and on-premises environments.
How It Works
A PersistentVolume represents a piece of storage in the cluster. It can be backed by network storage such as NFS, a cloud block volume, or a CSI-based storage system. Administrators can statically create these resources, or Kubernetes can dynamically provision them using a StorageClass.
A PersistentVolumeClaim is a request for storage made by a user or application. It specifies required capacity, access modes (such as ReadWriteOnce or ReadWriteMany), and optionally a storage class. Kubernetes matches the claim to an available volume that satisfies those requirements. If dynamic provisioning is enabled, the system automatically creates a new volume to fulfill the claim.
Pods reference the claim, not the underlying volume. Once bound, the claim acts as a stable handle to the storage resource. Even if the pod is rescheduled to another node, Kubernetes reattaches the volume as needed. Reclaim policies control what happens to the volume after the claim is deleted, such as retaining or deleting the underlying storage.
Why It Matters
This separation of concerns simplifies operations. Platform teams manage storage infrastructure and policies, while application teams declare their storage needs in manifests. No application changes are required when moving between environments or storage backends.
The pattern also improves reliability and portability. Workloads can restart, scale, or migrate across nodes without losing state, supporting production-grade databases, queues, and other stateful services in Kubernetes.
Key Takeaway
Persistent volumes and claims decouple storage infrastructure from application workloads, enabling portable, declarative, and reliable state management in Kubernetes.