nfs provisioner too old and needs an update

Bug #2014955 reported by Shunde Zhang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Kubernetes Worker Charm
Triaged
Medium
Unassigned

Bug Description

I followed this page [1] to set up nfs with my k8s 1.25.
However the nfs client provisioner is too old and deprecated.
When creating a pvc, it is always pending.
Checking the provisioner log, it is complaining about selfLink being empty.

E0331 06:53:31.562497 1 controller.go:1004] provision "controller-myk8scloud/storage-controller-0" class "default": unexpected error getting claim reference: selfLink was empty, can't make reference

This issue [2] suggests we can fix that by adding "--feature-gates=RemoveSelfLink=false" to apiserver.
But the value RemoveSelfLink is always true from 1.24 [3][4] and can't be set to false.
So according to some comments of [2] I changed to "gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0", which fixed the issue.
It seems nfs-subdir-external-provisioner is the replacement of nfs-client-provisioner [5]

My deployment looks like [6], and my storage class is like [7].
Please update templates/nfs-provisioner.yaml to use the new nfs-subdir-external-provisioner for k8s 1.24+.

[1] https://ubuntu.com/kubernetes/docs/storage
[2] https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/25
[3] https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
[4] https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1164-remove-selflink/README.md
[5] https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
[6] https://pastebin.ubuntu.com/p/CchMMmySgk/
[7] https://pastebin.ubuntu.com/p/X6hX3WxfGj/

Revision history for this message
George Kraft (cynerva) wrote :

Indeed, the nfs provisioner in kubernetes-worker is ancient and poorly maintained. The nfs-subdir-external-provisioner that you deployed seems like a fine replacement. I suspect that the NFS CSI driver[1] might be a better long term solution.

I also think that kubernetes-worker should not be responsible for this. I recommend we deprecate the NFS provisioner in kubernetes-worker and replace it with a better alternative (maybe a new charm) that deploys an external NFS provisioner.

[1]: https://github.com/kubernetes-csi/csi-driver-nfs

Changed in charm-kubernetes-worker:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.