美文网首页
nginx-ingress-controller升级0.25.1

nginx-ingress-controller升级0.25.1

作者: 北二条 | 来源:发表于2019-09-29 09:26 被阅读0次

    今天升级了nginx-ingres-controller,from 0.24.1 to 0.25.1,然后报标题描述的错误:

    Failed to list *v1beta1.Ingress: ingresses.networking.k8s.io is forbidden: User "system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount" cannot list resource "ingresses" in API group "networking.k8s.io" at the cluster scope
    

    原因已经说得很清楚明白了,没有access权限,
    原因很简单,太想当然的只升级了image版本,没有修改yaml其实官方的yaml已经修改了ClusterRole部分。
    https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml

    ---
    apiVersion: rbac.authorization.k8s.io/v1beta1
    kind: ClusterRole
    metadata:
      name: nginx-ingress-clusterrole
      labels:
        app.kubernetes.io/name: ingress-nginx
        app.kubernetes.io/part-of: ingress-nginx
    rules:
      - apiGroups:
          - ""
        resources:
          - configmaps
          - endpoints
          - nodes
          - pods
          - secrets
        verbs:
          - list
          - watch
      - apiGroups:
          - ""
        resources:
          - nodes
        verbs:
          - get
      - apiGroups:
          - ""
        resources:
          - services
        verbs:
          - get
          - list
          - watch
      - apiGroups:
          - ""
        resources:
          - events
        verbs:
          - create
          - patch
      - apiGroups:
          - "extensions"
          - "networking.k8s.io"
        resources:
          - ingresses
        verbs:
          - get
          - list
          - watch
      - apiGroups:
          - "extensions"
          - "networking.k8s.io"
        resources:
          - ingresses/status
        verbs:
          - update
    
    ---
    

    最怕开源这种升级说改就改也不提醒一下,最怕升出毛病啊。

    相关文章

      网友评论

          本文标题:nginx-ingress-controller升级0.25.1

          本文链接:https://www.haomeiwen.com/subject/oynlyctx.html