DELAPARRA
Index
Color
NL
Category: Kubernetes

PersistentVolume (PV)

Explained by Updated

What is PersistentVolume (PV)?

PersistentVolume (PV): A piece of cluster storage provisioned by an admin or a StorageClass. It exists independently of any Pod that uses it. A PersistentVolume, or PV, is a piece of storage in a Kubernetes cluster, such as a cloud disk or a network share. It exists independently of any pod, so data on it survives when pods restart or move.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about PersistentVolume (PV)

How is PersistentVolume (PV) used in practice?

On managed clusters, you rarely create PVs by hand. A StorageClass provisions them automatically when an application requests storage through a PersistentVolumeClaim.

What should you keep in mind with PersistentVolume (PV)?

Pay attention to the reclaim policy. With Delete, the underlying disk is removed when the claim is deleted, data included. With Retain, the disk stays and must be cleaned up manually. For databases and anything important, keep regular backups regardless, because a volume protects against pod restarts, not against accidental deletion, corruption or a bad migration.

What does an example of PersistentVolume (PV) look like?

apiVersion: v1 kind: PersistentVolume metadata: name: pv-data spec: capacity: { storage: 10Gi } accessModes: ["ReadWriteOnce"] hostPath: { path: /mnt/data }

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with P

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.