Skip to content
Latchkey

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.

kubectl describe pod
Warning  FailedMount  12s (x6 over 2m)  kubelet  MountVolume.SetUp failed for
volume "config" : configmap "app-config" not found

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

  1. "configmap/secret not found" → create it in the pod’s namespace before the workload.
  2. Wrong key/subPath → match the exact key name the volume references.
  3. 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 ""MountVolume.SetUp failed""?
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 "MountVolume.SetUp failed"?
The event names the exact volume and cause - a missing object, a bad key, or a CSI error.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card