Interview Prep/Kubernetes/Configuration, Secrets and storage

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 →

  1. kubectl describe pvc data-db-0 and read Events
  2. kubectl get storageclass to confirm a default class or the named class exists
  3. Check volumeBindingMode: WaitForFirstConsumer, which keeps PVCs Pending until a pod is scheduled
  4. Check the CSI driver pods and IAM permissions on EKS
  5. 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage