0%

升级Kubernetes V1.20后,pvc无法创建问题解决

今天升级Kubernetes1.20,发现PVC创建时一直处于pending状态,经过检查发现,nfs-client-provisioner日志有如下错误:

1
provision "test/test-sql" class "nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

经过查找发现这个是V1.10之后的配置修改,具体参考: https://github.com/kubernetes/enhancements/issues/1164

找到原因,直接修改/etc/kubernetes/manifests/kube-apiserver.yaml,增加参数:

1
- --feature-gates=RemoveSelfLink=false
坚持原创技术分享,您的支持将鼓励我继续创作!