安装nginx-ingress 失败


W0811 08:48:34.630347 6 flags.go:260] SSL certificate chain completion is disabled (–enable-ssl-chain-completion=false)
W0811 08:48:34.630422 6 client_config.go:543] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0811 08:48:34.630554 6 main.go:193] Creating API client for https://10.244.64.1:443
I0811 08:48:34.636106 6 main.go:237] Running in Kubernetes cluster version v1.18 (v1.18.5) - git (clean) commit e6503f8d8f769ace2f338794c914a96fc335df0f - platform linux/amd64
NGINX Ingress controller
Release: 0.30.0
Build: git-7e65b90c4
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.17.8


I0811 08:48:34.735742 6 main.go:102] SSL fake certificate created /etc/ingress-controller/ssl/default-fake-certificate.pem
W0811 08:48:34.742416 6 store.go:628] Unexpected error reading configuration configmap: configmaps “nginx-configuration” is forbidden: User “system:serviceaccount:ingress-controller:nginx-ingress-serviceaccount” cannot get resource “configmaps” in API group “” in the namespace “ingress-controller”: RBAC: clusterrole.rbac.authorization.k8s.io “nginx-ingress-clusterrole” not found
I0811 08:48:34.761646 6 nginx.go:263] Starting NGINX Ingress controller
E0811 08:48:34.763465 6 reflector.go:153] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:156: Failed to list *v1.Secret: secrets is forbidden: User “system:serviceaccount:ingress-controller:nginx-ingress-serviceaccount” cannot list resource “secrets” in API group “” at the cluster scope: RBAC: clusterrole.rbac.authorization.k8s.io “nginx-ingress-clusterrole” not found
E0811 08:48:34.763551 6 reflector.go:153] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:160: Failed to list *v1.Pod: pods is forbidden: User “system:serviceaccount:ingress-controller:nginx-ingress-serviceaccount” cannot list resource “pods” in API group “” in the namespace “ingress-controller”: RBAC: clusterrole.rbac.authorization.k8s.io “nginx-ingress-clusterrole” not found

  • 原因分析:

    提出您分析问题的过程,以便我们能更准确的找到问题所在
    应该和RABC的权限有关

  • 疑问:

    提出您对于遇到和解决该问题时的疑问

在第一台master节点执行一下 重启下ingress controller应该就可以了

kubectl apply -f /etc/kubernetes/plugins/ingress-controller/nginx-ingress-controller.yaml