A StatefulSet's PVC stays Pending. How do you debug?
IntermediateScenarioConfiguration, Secrets and storage
Answer
Situation read → kubectl get pvc shows Pending for data-db-0.
What I'd do →
kubectl describe pvc data-db-0and read Eventskubectl get storageclassto confirm a default class or the named class exists- Check
volumeBindingMode: WaitForFirstConsumer, which keeps PVCs Pending until a pod is scheduled - Check the CSI driver pods and IAM permissions on EKS
- Check zone and capacity constraints
Why → A PVC is bound only when a PV exists or can be provisioned, and the binding mode may delay that on purpose.
Interview tip → Mention WaitForFirstConsumer prevents zone mismatch on EBS.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner