kubernetes scheduling_error ai_generated true

Pod stuck in ContainerCreating state: waiting for volumes or CSI driver

ID: kubernetes/container-creating-stuck

Also available as: JSON · Markdown
85%Fix Rate
85%Confidence
90Evidence
2020-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
8 active

Root Cause

Pod remains in ContainerCreating state because volumes cannot be mounted. Common causes: CSI driver not installed, PV/PVC mismatch, node affinity conflicts with volume topology, or cloud provider volume limits reached.

generic

Workarounds

  1. 95% success Check events with kubectl describe pod to identify the specific volume mount failure
    kubectl describe pod <pod-name> -n <namespace>
    # Look at Events section for messages like:
    # 'FailedAttachVolume', 'FailedMount', 'MountVolume.SetUp failed'

    Sources: https://kubernetes.io/docs/concepts/storage/persistent-volumes/

  2. 88% success Install or verify the CSI driver is running
    kubectl get pods -n kube-system | grep csi
    kubectl get csidrivers
    # If the CSI driver is missing, install it:
    # helm install aws-ebs-csi-driver aws-ebs-csi-driver/aws-ebs-csi-driver -n kube-system

    Sources: https://kubernetes-csi.github.io/docs/

  3. 85% success Ensure PVC is bound and the volume is in the correct availability zone
    kubectl get pvc -n <namespace>
    # STATUS should be 'Bound'. If 'Pending', check:
    kubectl describe pvc <pvc-name>
    # For zone mismatch: ensure nodeAffinity or topology constraints match the volume's AZ

    Sources: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding

Dead Ends

Common approaches that don't work:

  1. Deleting and recreating the pod to force a fresh start 85% fail

    The new pod will hit the same volume mount issue. The problem is in the storage configuration, not the pod itself.

  2. Increasing pod resource limits thinking it's a resource issue 95% fail

    ContainerCreating is a pre-start state. The container hasn't started yet, so CPU/memory limits are irrelevant. The issue is volume mounting.

Error Chain

Leads to:
Frequently confused with: