Kubernetes "MountVolume.SetUp failed" / FailedMount - Fix in CI
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.
Warning FailedMount 12s (x6 over 2m) kubelet MountVolume.SetUp failed for
volume "config" : configmap "app-config" not foundCommon 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.
kubectl describe pod <pod> | grep -A2 -i failedmountFix 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.