Persistent Volume

· 1 min read · Containers and Orchestration · Concept

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: Delete or Retain.
  • 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.

More tutorials that use Persistent Volume

#Kubernetes