What it means
A PVC binds to a PersistentVolume that matches its storage class, size and access mode, or a provisioner creates one. Pending means neither has happened. "WaitForFirstConsumer" is normal until a Pod uses the claim.
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. The storageClassName doesn't exist or has no provisioner
Check:
kubectl describe pvc <claim>
kubectl get storageclass
Fix: Use an existing class (or the default), or install the provisioner.
2. Static volumes don't match (size, access mode, class, or a claimRef)
Check:
kubectl get pv
Fix: Make the claim's class, size and access mode match an Available volume.
3. Binding mode WaitForFirstConsumer and no Pod uses it yet
Check:
kubectl get storageclass <class> -o jsonpath='{.volumeBindingMode}'
Fix: Nothing to fix: it binds when a Pod is scheduled.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
Open the labNo account needed for your first tries.
Related errors
- 0/3 nodes are available: insufficient cpu
No node fits the Pod, so the scheduler leaves it Pending and says why in the events.