Sub topic 17
Troubleshooting Pending claims and stuck volumes
This chapter assumes you can read kubectl describe output and know how claims, StorageClasses, and binding modes work. The goal is a repeatable order of checks, so you read evidence before changing anything.
Start with the events
A claim in Pending has not bound to a volume. The reason is almost always in the Events section of the claim.
kubectl get pvc
kubectl describe pvc demo-pvc
kubectl get pv
kubectl get storageclassCompare the claim with the volumes and classes. Then read the last lines of describe.
Common causes of Pending
| Event or symptom | Cause | Fix |
|---|---|---|
| `waiting for first consumer to be created before binding` | Class uses `WaitForFirstConsumer` | No fix needed. Start a Pod that mounts the claim. |
| `storageclass ... not found` | Typo in `storageClassName`, or the class was never created | Correct the name or create the class. |
| `no persistent volumes available for this claim and no storage class is set` | No default class and no matching static volume | Set `storageClassName` or mark a default class. |
| No events, nothing provisions | The CSI controller is not running | Check the driver Pods, usually in `kube-system`. |
| Provisioning fails with a zone or permission error | Topology mismatch or missing cloud permissions | Read the driver logs and the node's zone labels. |
For static volumes, the claim binds only if the class name matches, the volume's capacity is at least the request, and the volume offers the requested access mode. A 1Gi claim cannot bind to a 500Mi volume.
Stuck objects
A claim stuck in Terminating is normally protected. The kubernetes.io/pvc-protection finalizer keeps it until no Pod uses it. Find and delete the Pod first, and do not remove the finalizer by hand.
kubectl describe pvc demo-pvcCheck the Used By field in the output.
A volume in Released is different. Its claim was deleted, but with Retain the old claimRef still points to it, so no new claim can bind. After you have saved or checked the data, clear the reference.
kubectl patch pv demo-pv -p '{"spec":{"claimRef":null}}'The volume then returns to Available.
A Pod stuck in ContainerCreating often means the claim is bound but the volume cannot attach or mount. Run kubectl describe pod and look for attach or mount errors. A ReadWriteOnce volume still attached to another node is a frequent cause.
Exercise
A claim using a class with volumeBindingMode: WaitForFirstConsumer stays Pending, and no Pod references it. Is something broken, and what do you do?
Show answer
Nothing is broken. Binding is delayed until a Pod that uses the claim is scheduled, so the scheduler can pick a volume location that fits the node. Create the Pod, and the claim then binds.