Kubernetes — Storage Overview — PV, PVC and Storage Class
Published in
3 min readSep 13, 2021
Kubernetes Storage Options — Persistent Volumes (PV), Persistent Volume Claims (PVC), Storage Classes (SC).
TL;DR
Kubernetes has a number of storage types, and these can be mixed and matched within a pod. The important objects for running stateful containers are:
- Persistent Volume — low level representation of a storage volume.
- Persistent Volume Claim — binding between a Pod and Persistent Volume.
- Storage Class — allows for dynamic provisioning of Persistent Volumes.
Persistent Volumes (PV)
- PV is an abstraction for the physical storage device that attached to the cluster. PV is used to manage durable storage which needs actual physical storage.
- PV is independent of the lifecycle of the Pods. It means that data represented by a PV continue to exist as the cluster changes and as Pods are deleted and recreated.
- PV is not Namespaced, it is available to whole cluster. i.e. PV is accessible to all namespaces.
- PV is resource in the cluster that can be provisioned dynamically using Storage Classes, or they can be explicitly created by a cluster administrator.
- Unlike Volumes, the PVs…