当前位置: 首页 >> Docker >> 【排错】Kubernetes 创建 pvc error getting claim reference: selfLink was empty, can‘t make refere >> 正文

【排错】Kubernetes 创建 pvc error getting claim reference: selfLink was empty, can‘t make refere

2021年11月22日 09:59:57    作者:Jiaozn    分类:Docker     评论(0)

kubersphere,nfs报错 provision "gitlib/gitlab-gitlab" class "nfs-client": unexpected error getting claim reference: selfLink was empty, can't make reference

kubernetes v1.20版本创建pvc 报错

E0304 06:18:05.352939       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:18:06.365388       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:18:06.371904       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:23:09.410514       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:23:09.416387       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:23:16.933814       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:23:16.937994       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:33:06.365740       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:33:06.369275       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:48:06.365940       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:48:06.369685       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:56:41.027826       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:56:41.030424       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 06:56:53.795508       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 06:56:53.803277       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

I0304 07:03:06.366503       1 controller.go:987] provision "default/diss-db-pvc" class "managed-nfs-storage": started

E0304 07:03:06.372021       1 controller.go:1004] provision "default/diss-db-pvc" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

找了找资料发现,kubernetes 1.20版本 禁用了 selfLink。


解决方法


资料连接:

https://stackoverflow.com/questions/65376314/kubernetes-nfs-provider-selflink-was-empty

https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/25


当前的解决方法是编辑

/etc/kubernetes/manifests/kube-apiserver.yaml

在这里:

spec:

  containers:

  - command:

    - kube-apiserver


添加这一行:

- --feature-gates=RemoveSelfLink=false


然后应用它,即可

kubectl apply -f /etc/kubernetes/manifests/kube-apiserver.yaml


除非注明,发表在“Jiaozn的博客”的文章『【排错】Kubernetes 创建 pvc error getting claim reference: selfLink was empty, can‘t make refere』版权归Jiaozn所有。 转载请注明出处为“本文转载于『Jiaozn的博客』原地址https://jiaozn.com/reed/736.html

评论

发表评论   

昵称*

E-mail*

网站