-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Kubernetes v1.20.0, getting "unexpected error getting claim reference: selfLink was empty, can't make reference" #25
Comments
I can confirm that I have this problem too on my new cluster using Kubernetes v1.20 with those same logs/errors when creating a test pvc. |
Current workaround is to edit /etc/kubernetes/manifests/kube-apiserver.yaml Under here:
Add this line: The do this: (I had to do it twice to get it to work) |
Yep, exactly the same issue. In k8s 1.20 they have removed selfLink as per release notes. Adding selfLink manually does not help, as that is removed by API server immediatelly. |
I used @nealman13's workaround until a fix is made and it works now. Thanks ! |
Just to add to what @nealman13 provided. Before first leader election log, there is this error:
|
Just a note about |
The workaround will no longer work after 1.20. |
The "fix" now causes a |
have you tried #26 ? |
It does not appear to be merged. So, no, I have not pulled and built that PR (yet). |
@zaneclaes: I created a fork of nfs-subdir-external-provisioner, merged the PR from @petermicuch and adapted the action workflow to create an automated build + multi-arch. docker image - try v3.2.0 of https://hub.docker.com/r/groundhog2k/nfs-subdir-external-provisioner/tags?page=1&ordering=last_updated - It should work for Kubernetes >= V1.20.x. |
I have tried your fork with feature-gate trick but pvc stucks in pending state. Kubernetes version is 1.20.0 log message is; Waiting for a volume to be created, either by external provisioner "cluster.local/nfs-client-provisioner" or manually created by system administrator |
@olcayseker: I don't know which fork you mean, but if you are talking about https://github.com/groundhog2k/nfs-subdir-external-provisioner, i can say it's definetly working. I tested in on ARM64 and AMD64/x86 with and without feature-gate switch and using it since 15 days on my mixed-arch. cluster without any problems. Have you looked at the logs of the nfs-provisioner pod when PVC is in pending state? |
it work for me ,thank you |
No more workarounds please :-) - this issue was closed for a reason guys! Just use new available docker image: |
the same error, trying |
same error class "nfs-client": unexpected error getting claim reference: selfLink was empty, can't make reference my env:
|
@abdennour - you should read the comments above. This issue is closed and there is new helm chart and new container image existing that fixed this issue. Please try to update with helm.
|
Thank you @petermicuch
Then run helm apply |
@abdennour - feel free to create PR with your migration description, I think maintainers will accept it if it adds value to the community. But please create separate feature request for that one. Thank you. |
kubernetes-sigs/nfs-subdir-external-provisioner#25 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com>
* update to kubernetes 1.22 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * back off 1.22 upgrade temporarily Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "back off 1.22 upgrade temporarily" This reverts commit c60301e. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * add debug for the nfs volumes Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update nfs chart kubernetes-sigs/nfs-subdir-external-provisioner#25 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * include release name Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Kick ci Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update knative eventing version Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * disable knative as a test Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update tekton release Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "disable knative as a test" This reverts commit b6f4c69. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * up timeout a bit Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> Co-authored-by: Nicholas Goracke <ngoracke@us.ibm.com>
* update to kubernetes 1.22 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * back off 1.22 upgrade temporarily Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "back off 1.22 upgrade temporarily" This reverts commit c60301e. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * add debug for the nfs volumes Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update nfs chart kubernetes-sigs/nfs-subdir-external-provisioner#25 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * include release name Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Kick ci Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update knative eventing version Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * disable knative as a test Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update tekton release Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "disable knative as a test" This reverts commit b6f4c69. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * up timeout a bit Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> Co-authored-by: Nicholas Goracke <ngoracke@us.ibm.com>
* update to kubernetes 1.22 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * back off 1.22 upgrade temporarily Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "back off 1.22 upgrade temporarily" This reverts commit c60301e. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * add debug for the nfs volumes Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update nfs chart kubernetes-sigs/nfs-subdir-external-provisioner#25 Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * include release name Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Kick ci Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update knative eventing version Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * disable knative as a test Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * update tekton release Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * Revert "disable knative as a test" This reverts commit b6f4c69. Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> * up timeout a bit Signed-off-by: Nicholas Goracke <ngoracke@us.ibm.com> Co-authored-by: Nicholas Goracke <ngoracke@us.ibm.com>
Worked for me also , Storage class definition simpler as well |
this works! thanks a lot!!!! |
@petermicuch |
apiVersion: v1 kind: Pod metadata: annotations: kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 192.168.100.100:6443 creationTimestamp: null labels: component: kube-apiserver tier: control-plane name: kube-apiserver namespace: kube-system spec: containers: - command: - kube-apiserver - --advertise-address=192.168.100.100 - --allow-privileged=true - --audit-log-format=json - --audit-log-maxage=7 - --audit-log-maxbackup=10 - --audit-log-maxsize=100 - --audit-log-path=/var/log/kubernetes/audit.log - --audit-policy-file=/etc/kubernetes/audit-policy.yml - --authorization-mode=Node,RBAC - --client-ca-file=/etc/kubernetes/pki/ca.crt - --enable-admission-plugins=NodeRestriction - --enable-aggregator-routing=true - --enable-bootstrap-token-auth=true - --etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt - --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt - --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key - --etcd-servers=https://127.0.0.1:2379 - --feature-gates= - --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt - --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname - --proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt - --proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key - --requestheader-allowed-names=front-proxy-client - --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt - --requestheader-extra-headers-prefix=X-Remote-Extra- - --requestheader-group-headers=X-Remote-Group - --requestheader-username-headers=X-Remote-User - --secure-port=6443 - --service-account-issuer=https://kubernetes.default.svc.cluster.local - --service-account-key-file=/etc/kubernetes/pki/sa.pub - --service-account-signing-key-file=/etc/kubernetes/pki/sa.key - --service-cluster-ip-range=10.96.0.0/22 - --tls-cert-file=/etc/kubernetes/pki/apiserver.crt - --tls-private-key-file=/etc/kubernetes/pki/apiserver.key - --feature-gates=RemoveSelfLink=false The connection to the server apiserver.cluster.local:6443 was refused - did you specify the right host or port? |
This solutions doesn't work in kubernetes > 1.26 I updated the image to - gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 and it worked thanks to @petermicuch for the solutions try this @lIlIlllllmeng |
Using Kubernetes v1.20.0
Attempting to create pvc's, they all remain in "pending" status
Doing a kubectl logs nfs-client-provisioner gives this:
I1210 14:42:01.396466 1 leaderelection.go:194] successfully acquired lease default/fuseim.pri-ifs
I1210 14:42:01.396534 1 controller.go:631] Starting provisioner controller fuseim.pri/ifs_nfs-client-provisioner-64b7476494-p4fcm_dcfca333-3af5-11eb-8248-5aed4ceb7af7!
I1210 14:42:01.496922 1 controller.go:680] Started provisioner controller fuseim.pri/ifs_nfs-client-provisioner-64b7476494-p4fcm_dcfca333-3af5-11eb-8248-5aed4ceb7af7!
I1210 14:42:01.497152 1 controller.go:987] provision "default/pvc1" class "managed-nfs-storage": started
I1210 14:42:01.497157 1 controller.go:987] provision "default/test-claim" class "managed-nfs-storage": started
E1210 14:42:01.500487 1 controller.go:1004] provision "default/pvc1" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference
E1210 14:42:01.500502 1 controller.go:1004] provision "default/test-claim" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference
selfLink has been disabled in v1.20.0
kubernetes/enhancements#1164
The text was updated successfully, but these errors were encountered: