Interview Prep/Real-World Interview/Kubernetes cluster-level

A new PVC stays `Pending` for 20 minutes; `kubectl describe` shows "no persistent volumes available for this claim and no storage class is set".

BeginnerTroubleshootingKubernetes cluster-level
Answer

Likely causes → The PVC has no storageClassName and the cluster has no default StorageClass, so nothing provisions a volume. A related case is "waiting for first consumer to be created before binding", which is normal for WaitForFirstConsumer classes until a pod uses the claim. Another is a missing CSI driver (on EKS 1.23+ you need the EBS CSI driver add-on).

Diagnose →

kubectl describe pvc data -n prod | tail -5
kubectl get storageclass
kubectl get pods -n kube-system | grep -i csi

Fix → Set storageClassName: gp3 on the PVC, or mark a default class:

kubectl patch storageclass gp3 -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Install the CSI driver and its IAM role if missing.

Prevent → Make the default StorageClass and CSI driver part of the cluster bootstrap, and always set storageClassName explicitly in charts.

All Real-World Interview questions Roadmap: Interview readiness

More on Kubernetes cluster-level