Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Two similar entries in deployment "volumes" section cause pod start stuck #82526
I'm creating a deployment with two equal entries in spec.template.volumes section. Bot entries are persistent volume claim for an NFS persistent volume on GCE. The pods of the deployment do not start pending in the ContainerCreating state. After a wile the kubctl describe pod shows this message (I've replaced sensitive names with <...>-s) :
Warning FailedMount 78s (x7 over 14m) kubelet, Unable to mount volumes for pod "(f95cfe95-d3a8-11e9-8250-42010a80002a)": timeout expired waiting for volumes to attach or mount for pod "default"/"". list of unmounted volumes=. list of unattached volumes=[ ]
Pod never starts after this. If removing the 2nd volume (and referencing the 1st one from the spec.template.spec.containers.volumeMounts) the issue does NOT reproduce.
The NFS volume in question is:
I can provide all the yaml files if required.
What you expected to happen:
Pod starts with two volumes attached OR kubelet reports back that equal entries are not allowed.
I agree it's not OK to have two equal entries in volumes, and the proper file must have 1, apparently the behavior when pod just stuck with mount timeout is not expected.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
This all happens on GCE k8s cluster.