Persistent Volume
A PersistentVolume (PV) is storage in the cluster (a cloud disk, an NFS export). A PersistentVolumeClaim (PVC) is an application's request for it, which a pod mounts. A StorageClass creates PVs on demand (dynamic provisioning). Data survives pod restarts in Kubernetes.
Key concepts #
- Access modes:
ReadWriteOnce,ReadOnlyMany,ReadWriteMany,ReadWriteOncePod. - Reclaim policy:
DeleteorRetain. - StatefulSet: one PVC per replica with
volumeClaimTemplates. WaitForFirstConsumer: create the disk in the zone of the pod.
Learn it #
Read Persistent Volumes, PVC and StorageClass and Kubernetes with NFS.