aaa

创建依赖时遇到的错误

pvc创建失败报错:

Events:
  Type    Reason                Age                  From                         Message
  ----    ------                ----                 ----                         -------
  Normal  ExternalProvisioning  1s (x19 over 4m18s)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "nfs-storage" or manually created by system administrator

注意查看nfs pod日志,有报错

E0511 10:28:46.640171       1 leaderelection.go:234] error retrieving resource lock kube-system/nfs-nfs1: endpoints "nfs-nfs1" is forbidden: User "system:serviceaccount:kube-system:eip-nfs-client-provisioner" cannot get resource "endpoints" in API group "" in the namespace "kube-system"
[root@ikj-141 test]# kubectl get pods
error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

没有设置KUBERNETES_MASTER

原文地址:https://www.cnblogs.com/wangzhangtao/p/12930388.html