当前位置: 首页 > 工具软件 > K.R.S.S. > 使用案例 >

ingress-nginxr创建时报Failed to list *v1beta1.Ingress: ingresses.networking.k8s.io is forbidden错误

巫英纵
2023-12-01

错误描述

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
其中Pod nginx-ingress-controller-xxx一直 CrashLoopBackOff

解决办法

  • 环境:ingress-nginx : 0.25.0
    编辑ingress的 mandatory.yaml 在ClusterRole位置添加下述代码然后重新apply -f 即可
- apiGroups:
      - "extensions"
      - "networking.k8s.io"
    resources:
      - ingresses
    verbs:
      - list
      - watch
 类似资料: