现象: Normal ExternalProvisioning 3s (x18 over 4m8s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "nfs-client" or manually created by system administrator
分析,原因:
因为原来是1.21.1版本(我的是1.21.1)默认禁止使用selfLink
处理方法一:(不适用1.26.6版本)
、修改kube-apiserver 配置:
添加:
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --feature-gates=RemoveSelfLink=false # 添加这项
处理方法二(适用1.20.x以上所有版本):
修改 nfs-provisioner.yaml 镜像为
image: m.daocloud.io/gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0