Interview Prep/Kubernetes/Rapid-Fire Commands

Write the commands to find why a PVC is stuck Pending on EKS.

AdvancedProductionRapid-Fire Commands
Answer
kubectl describe pvc data-db-0 -n shop            # events: waiting for first consumer, provisioning failed
kubectl get sc                                    # does the class exist? provisioner ebs.csi.aws.com?
kubectl -n kube-system get pods -l app=ebs-csi-controller
kubectl -n kube-system logs deploy/ebs-csi-controller -c csi-provisioner --tail=50

Typical causes: missing IAM role for the driver, wrong StorageClass name, WaitForFirstConsumer with no Pod yet, or zone mismatch.

All Kubernetes questions

More on Rapid-Fire Commands