Kubernetes persistent volume claim investigation cheat sheet
Investigate a pending persistent volume claim using claim events, storage classes and bound volumes.
Kubernetes cluster with kubectl read access to PVCs, pods and relevant storage resources.
Updated · Kubernetes · 6 min read
| Command | What it does |
|---|---|
kubectl config current-context | Confirm the cluster context |
kubectl get pvc data-web -n production -o wide | Inspect the claim status |
kubectl describe pvc data-web -n production | Inspect claim details and events |
kubectl get storageclass | List storage classes and binding modes |
kubectl get pods -n production -o wide | Inspect workload scheduling |
kubectl get pv | Inspect persistent volumes |
Walkthrough
Replace production and data-web with the actual namespace and claim. Confirm cluster context and use authorized read access; these commands do not delete claims, volumes or workloads.
Step 1: Confirm the cluster context
kubectl config current-context
Compare the locally named context with the authorized cluster inventory. Similar local names can refer to different environments, so establish the target before interpreting resources.
Step 2: Inspect the claim status
kubectl get pvc data-web -n production -o wide
Record status, storage class, requested size and any bound volume. A Pending claim is a symptom; its events and binding mode provide the next clues.
Step 3: Inspect claim details and events
kubectl describe pvc data-web -n production
Read the requested access modes, storage class and recent provisioning events. Some classes wait for a consumer to be scheduled before binding; Pending can therefore be an intentional intermediate state.
Step 4: List storage classes and binding modes
kubectl get storageclass
Identify the claim’s named storage class and its volume binding mode. A missing default class or a different class name can lead to different provisioning behavior.
Step 5: Inspect workload scheduling
kubectl get pods -n production -o wide
Identify the pod using the claim and inspect its scheduling state. With WaitForFirstConsumer, placement and storage topology influence provisioning; do not treat an unbound claim in isolation as a failure.
Step 6: Inspect persistent volumes
kubectl get pv
If the claim is bound, match its volume name to the PV and compare capacity, access mode and reclaim policy. A PV object does not prove that a filesystem is mounted or the backing storage is healthy.
WORKED INCIDENT
Practical case: A workload is pending with an unbound claim
Fictional teaching scenario; observations are examples, not captured production output.
Situation
A new application pod waits while its data claim remains Pending.
Investigation sequence
1. Confirm the cluster context
kubectl config current-contextConfirm cluster and namespace before inspecting the affected workload.
2. Inspect the claim status
kubectl get pvc data-web -n production -o wideCapture the exact claim status and storage class name.
3. Inspect claim details and events
kubectl describe pvc data-web -n productionRead recent claim events and requested access modes.
4. List storage classes and binding modes
kubectl get storageclassCompare the storage class binding mode with the pod scheduling state.
Example findings
Illustrative findings: the claim uses WaitForFirstConsumer and the consumer pod cannot be scheduled because no node satisfies its placement constraints.
Interpret the findings
The claim waiting for scheduling is consistent with the configured binding mode in this example. Resolve the scheduling evidence before assuming the storage provisioner is broken.
Verify the outcome
After the workload owner resolves the approved scheduling issue, verify the claim binds, the pod starts and the application can access its expected data.
Escalation handoff
Provide namespace, claim name, storage class, binding mode and sanitized events to the platform and storage owners.
Primary references
Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.