Request storage with a PVC The operator creates a PVC (a storage request): "10Gi, read-write from one node (RWO), class fast".
No real space exists yet. The PVC waits quietly as Pending until a matching PV appears.
Key idea A PVC is the request, a PV is the actual space, and a StorageClass is the spec for how that space gets created.
The provisioner notices the new request StorageClass fast says "space of this class is created by this provisioner". A provisioner is the program that actually creates storage.
Here the controller of a CSI driver (the standard interface connecting storage to Kubernetes) does the job. It watches for new PVCs and reads the class spec.
A real disk is created on the storage system The provisioner asks the storage system to "create a 10Gi volume", and the system returns the new volume ID.
If the StorageClass name is wrong, the provisioner is missing, or the system is out of capacity, it stops here and the PVC stays Pending.
A PV is created and paired with the PVC The provisioner creates a PV pointing at that volume and pairs it with the requesting PVC (binding). The PVC status becomes Bound.
Once made, this pairing lasts until the PVC is deleted. No other request can take this PV.
What changed in this step
+ PV created (10Gi)~ PVC Pending → BoundA pod using this PVC is placed on node-2 Create a db pod that says "mount the PVC db-data at /var/lib/db". The scheduler places it on node-2.
The kubelet on node-2 looks at the pod's PVC and checks which volume its bound PV refers to.
Attach to the node, then mount inside the pod First the control plane side (the attach-detach controller and CSI) attaches the volume to node-2. Next, the kubelet and CSI node plugin on node-2 format it if it is new and mount it where the pod will use it. Only then does the container start.
If attach fails, the pod events show FailedAttachVolume. If mount fails, they show FailedMount. Either way the pod stays in ContainerCreating.
Key idea RWO means it attaches to "one node" only. If the volume is still attached to another node, it cannot attach to the new node and waits.
The data survives when the pod is deleted The data was written to the volume on the storage system, not inside the pod. When the pod is deleted, the PVC, PV, and volume all remain.
When a new pod uses the same PVC, the same volume is attached and mounted again, and the old data is read as is.
Key idea Deleting a PVC deletes data, not deleting a pod. If the reclaim policy is Delete, deleting the PVC also deletes the PV and the actual data.
What changed in this step
− Old db pod deleted+ New db pod · same PVCWhen a PVC will not leave Pending If a new PVC has a typo in its StorageClass name, the provisioner is not installed, or it asks for an unsupported access mode, the PVC stays Pending with no error.
The cause appears in the PVC events. But with a WaitForFirstConsumer class, which creates space after the pod is placed on a node, Pending is normal until a pod exists.
Watch out Even with no matching PV or StorageClass, the PVC is created and stays Pending. Check the Events in kubectl describe pvc for the reason.
The request and the actual space are separate The operator requested only what was needed with a PVC. The StorageClass and provisioner created the space. Attaching happened on the node where the pod ran.
Because the space lives outside the pod, data survives pod changes. But deleting the PVC can delete the data too, depending on the reclaim policy.
Summary A PVC is the request, a PV is the actual space. Before deleting a PVC, check RECLAIM POLICY in kubectl get pv to see whether the data will remain.