Kubernetes "MountVolume.SetUp failed" / FailedMount - Fix in CI
By Daniel Zoghalchali·Latchkey
The kubelet tried to set up a volume for the pod and failed. For Secret/ConfigMap volumes this almost always means the source object (or a referenced key) does not exist; for CSI volumes the driver could not provision or attach it.
What this error means
A pod stays in ContainerCreating and kubectl describe pod shows repeating Warning FailedMount ... MountVolume.SetUp failed for volume "<vol>" : <reason>. The pod never starts because a volume cannot be mounted.
kubectl describe pod
Warning FailedMount 12s (x6 over 2m) kubelet MountVolume.SetUp failed for
volume "config" : configmap "app-config" not found
Diagnose it: read events, not just status
A deployment that never becomes ready has the reason in its events and in the pod state, not in the deployment status. Read both before changing the manifest.
Terminal
kubectl rollout status deploy/<name> --timeout=120s
kubectl describe deploy/<name> | sed -n "/Events/,$p"
kubectl get pods -l app=<name> -o wide
kubectl describe pod <pod> | sed -n "/Events/,$p"
kubectl logs <pod> --previous --tail=50 # the crash before the restart
Common causes
Mounted Secret/ConfigMap missing
A volume sources a Secret or ConfigMap that was never created in the pod’s namespace (or a subPath/key that does not exist), so setup fails.
CSI driver or attachment problem
For a CSI/cloud volume, the driver is unhealthy, the volume is not yet attached, or credentials/permissions to mount it are missing.
How to fix it
Read the FailedMount reason
The event names the exact volume and cause - a missing object, a bad key, or a CSI error.
Terminal
kubectl describe pod <pod> | grep -A2 -i failedmount
Fix by the reason
"configmap/secret not found" → create it in the pod’s namespace before the workload.
Wrong key/subPath → match the exact key name the volume references.
CSI error → check the driver pods (kubectl -n kube-system get pods) and the volume’s attachment.
How to prevent it
Apply mounted Secrets/ConfigMaps in the same namespace and before the pod.
Keep volume keys/subPaths in sync with the referenced objects.
Monitor CSI driver health so attach/mount failures surface early.
Frequently asked questions
What causes Kubernetes "MountVolume.SetUp failed" / FailedMount?
There are 2 common causes: mounted secret/configmap missing and csi driver or attachment problem. A volume sources a Secret or ConfigMap that was never created in the pod’s namespace (or a subPath/key that does not exist), so setup fails.
How do I fix Kubernetes "MountVolume.SetUp failed" / FailedMount?
There are 2 fixes depending on which cause you have: read the failedmount reason and fix by the reason. Work through them in order, since the first is the most common.
What does Kubernetes "MountVolume.SetUp failed" / FailedMount actually mean?
A pod stays in ContainerCreating and kubectl describe pod shows repeating Warning FailedMount ...
How do I stop Kubernetes "MountVolume.SetUp failed" / FailedMount happening again?
Apply mounted Secrets/ConfigMaps in the same namespace and before the pod. The prevention section lists 3 changes that keep it from recurring.