Volumes, PVs & PVCs

A pod writes records into three places: its container's filesystem, an emptyDir, and a PersistentVolume reached through its claim. Restart, delete, re-claim, and see which records survive. Or press ▶ Guided tour.

Drag to rotate · click a part

Where the app writesRecordsLives as long asSo

A container's own filesystem is thrown away whenever it restarts. An emptyDir volume belongs to the pod, so it survives container restarts but not the pod. For data that must outlive pods, a pod mounts a PersistentVolumeClaim; a StorageClass provisions a PersistentVolume to satisfy it and binds the two, and a replacement pod using the same claim finds the same data. When the claim is deleted, the volume's reclaimPolicy decides: Delete removes it, Retain keeps it as Released.