今天升级Kubernetes
到1.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 |