1.pvc 状态pending 报错:persistentvolume-controller  waiting for a volume to be created, either by external provisioner "nfs-client" or manually created by system administrator

2.原因:因为原来是1.20版本(我的是1.21.1)默认禁止使用selfLink

3.解决办法一(不适用1.26.6以上):

在apiserver.yaml里面添加:

- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --feature-gates=RemoveSelfLink=false 

再次重启apiserver,pvc 状态变为 Bound

解决方法二(适用1.20.x以上所有版本):

修改 nfs-provisioner.yaml 镜像为

image: m.daocloud.io/gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 

 

 

posted on 2022-05-28 23:57  MhaiM  阅读(871)  评论(0编辑  收藏  举报