Kubernetes storage · Diagram 1 of 2 · Architecture
How a Pod gets storage
Pods don't ask for disks directly. They point at a PersistentVolumeClaim (a request). The claim is then matched to a PersistentVolume (the actual volume). There are two ways that PV can come into existence.
In Path A the PV is created on demand. The claim names a StorageClass, and the class names a provisioner that creates both the disk and the PV.
The simpler path: the PV exists first
Not every StorageClass creates storage. In Path B an administrator writes the PV by hand. Kubernetes only matches a waiting claim to it by class, size and access mode.
The four objects, in plain words
Pod: your running app. It lists a PVC under volumes and mounts it at a path.
PVC: "I need 10Gi of fast-ssd storage." A request that lives in your namespace.
StorageClass: a recipe set up by the cluster admin. Its provisioner field says who, if anyone, creates storage for this class.
PV: the real volume, represented as a cluster-wide object. One PV binds to one PVC.
Dynamic vs. static
Dynamic: the class names a real provisioner, usually a CSI driver like ebs.csi.aws.com. A new PVC triggers creation of a disk and a PV.
Static: an admin creates PVs ahead of time. A class using kubernetes.io/no-provisioner never creates PVs. It is commonly used for local PVs (disks attached to one node).
If no matching PV exists for a no-provisioner class, the PVC simply stays Pending.
Fidelity note
Simplified for beginners:
"CSI Provisioner" merges the external-provisioner sidecar and the CSI driver into one box.
The PV controller (in kube-controller-manager) that does the binding is not drawn. "BINDS 1:1" stands for its work.
Not shown: default StorageClass, access modes, reclaim policy, PVs with no class (storageClassName: ""), volume attach, nodeAffinity on local PVs.