Menu

1 / 4

Kubernetes Persistent Volumes: PV, PVC and StorageClass

DEV Community: kubernetes·Michael Zion·about 18 hours ago
#6OIgipYc
#devtokubernetes#devto#dev#claim#volume
Long article (5505 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.