Interview Prep/Kubernetes/Scheduling and Pending Pods

A StatefulSet Pod is Pending with `pod has unbound immediate PersistentVolumeClaims`.

BeginnerTroubleshootingScheduling and Pending Pods
Answer

Likely causes → The PVC is not bound yet: no default StorageClass, the named StorageClass does not exist, the CSI provisioner is failing, or static PVs do not match size/accessMode/class.

Diagnose →

kubectl get pvc -n data
kubectl describe pvc data-db-0 -n data | sed -n '/Events/,$p'
kubectl get storageclass

Fix → Set a default StorageClass (storageclass.kubernetes.io/is-default-class: "true"), fix storageClassName, or fix the provisioner (see Storage section). Once the PVC binds, the Pod schedules.

Prevent → Use volumeBindingMode: WaitForFirstConsumer classes and verify the CSI driver as part of cluster bootstrap tests.

All Kubernetes questions Roadmap: Kubernetes core

More on Scheduling and Pending Pods