A Kubernetes persistent volume is storage that outlives the Pod that uses it. You get one through 3 objects: a PersistentVolumeClaim (PVC) asks for storage, a PersistentVolume (PV) is the storage, and a StorageClass creates the PV when the claim shows up. 5 things to know before you put data on one:
Bottom line
PVC = the request. PV = the record of a real disk. App teams write claims. The cluster creates the volume
The StorageClass decides what you get. Disk type, when the disk is created, whether it can grow, and what happens to the data when the claim is deleted
The default is to delete your data. Dynamically created volumes have the reclaim policy Delete. Delete the claim and the disk goes with it
ReadWriteOnce does NOT mean 1 Pod. It means 1 node. Only ReadWriteOncePod limits a volume to 1 Pod
A disk usually lives in 1 zone.…