nfs-ganesha-server-and-external-provisioner: Timeout when Pods try to mount volumes referencing PVCs of storageClass `nfs` on K3D cluster
Problem:
I am trying to get nfs-server-provisioner
to work in K3D. PVCs and PVs are handled correctly, but Pods cant mount the volume referenced by a PVC. I created an example to make it easy to reproduce the issue in a GitRepo: https://github.com/tricky42/k3d-nfs with a more detailed description.
In this setup the local-path
provider from K3D is used to provide the PV for the NFS server automatically through the PVC issued by the nfs-server-provisioner
. PVCs of storage class nfs
can be provisioned (status: bound), but still pods trying to mount volumes which reference a PVC of storageClass nfs
(in this example the PVC nfs-for-pods
) are not starting up due to:
MountVolume.SetUp failed for volume "pvc-52c0d57a-b285-45b6-b04c-41175604b0d0" : mount failed: exit status 255
Mounting command: mount Mounting arguments: -t nfs -o vers=3 10.43.192.199:/export/pvc-52c0d57a-b285-45b6-b04c-
41175604b0d0 /var/lib/kubelet/pods/c9e21798-76ad-404d-b089-c9fff88e0a86/volumes/kubernetes.io~nfs/pvc-
52c0d57a-b285-45b6-b04c-41175604b0d0 Output: mount: mounting 10.43.192.199:/export/pvc-52c0d57a-b285-45b6-
b04c-41175604b0d0 on /var/lib/kubelet/pods/c9e21798-76ad-404d-b089-c9fff88e0a86/volumes/kubernetes.io~nfs/pvc-
52c0d57a-b285-45b6-b04c-41175604b0d0 failed: Connection refused
Unable to attach or mount volumes: unmounted volumes=[nfs-mount], unattached volumes=[nfs-mount default-token
-t7qxd]: timed out waiting for the condition
To quickly reproduce this, just enter:
$ make all
So far I couldnt find out, why the Pod cant mount the volume managed by the nfs server 😦
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (5 by maintainers)
Commits related to this issue
- Trying out proposed solution proposed by @kycfeel [here](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner/issues/34#issuecomment-814760518) — committed to tricky42/k3d-nfs by tricky42 3 years ago
- Improve reconnecting behaviour See https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner/issues/34#issuecomment-1145340129 for further insights — committed to h0jeZvgoxFepBQ2C/nfs-ganesha-server-and-external-provisioner by h0jeZvgoxFepBQ2C 2 years ago
Ok so for me, I’ve solved this issue by adding the flags below at the values.yaml (helm chart),
mountOptions
.@tricky42 Can you try with these flags on your environment?