Pods hang for minutes in ContainerCreating with `Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[kube-api-access-x data]: timed out waiting for the condition`.
IntermediateTroubleshootingStorage and volumes
Answer
Likely causes → A generic timeout that hides the real error. Usual reasons: volume still attached elsewhere, CSI node plugin not running on that node, cloud API throttling, or the node hit its maximum attachable volumes.
Diagnose →
kubectl describe pod db-0 | sed -n '/Events/,$p' # look for the first specific error
kubectl get pods -n kube-system -o wide | grep ebs-csi-node | grep <node>
kubectl get csinode <node> -o jsonpath='{.spec.drivers[*].allocatable}'
kubectl get volumeattachments -o wide | grep <pv>
Fix → Fix the specific cause: restart the CSI node Pod on that node, wait for detach, or move the Pod to a node with free attachment slots.
Prevent → Alert on CSI node DaemonSet health and on VolumeAttachment objects stuck with attachError.
More on Storage and volumes
A PVC is `Pending` with `no persistent volumes available for this claim and no storage class is set`.BeginnerA PVC sits `Pending` with event `waiting for first consumer to be created before binding`. Is something broken?BeginnerA PVC is stuck with `waiting for a volume to be created, either by external provisioner "ebs.csi.aws.com" or manually created by system administrator`.IntermediateA Pod is stuck `ContainerCreating` with `Multi-Attach error for volume "pvc-3f1c..." Volume is already exclusively attached to one node and can't be attached to another`.IntermediateA Deployment with one replica and an RWO PVC gets `Multi-Attach error` on every rollout.BeginnerVolume attach fails with `AttachVolume.Attach failed for volume "pvc-..." : rpc error: code = Internal desc = Could not attach volume ... UnauthorizedOperation: You are not authorized to perform this operation`.Intermediate