AWS EKS - 协调器错误无法自动发现子网

Ric*_*. M 3 amazon-web-services node.js microservices amazon-eks

我已经在 aws eks 中部署了节点应用程序,直到今天一切正常。当我今天部署最新版本时突然出现以下错误。

无法自动发现子网:UnauthorizedOperation:您无权执行此操作

{"level":"error","ts":1622476232.9828672,"logger":"controller","msg":"Reconciler error","controller":"ingress","name":"ingress-srv","namespace":"default","error":"couldn't auto-discover subnets: UnauthorizedOperation: You are not authorized to perform this operation.\n\tstatus code: 403, request id: 0a2968bf-62c2-4a29-a41a-e5defc135e3f"}

这是入口 yaml。

kind: Ingress
metadata:
  name: ingress-srv
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: rabbitmq
          servicePort: 15672
        path: /api/v1/rabbitmq/*
        pathType: Prefix
      - backend:
          serviceName: srv-auth
          servicePort: 4000
        path: /api/v1/users/*
        pathType: Prefix
Run Code Online (Sandbox Code Playgroud)

这是部署yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: srv-auth-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: srv-auth
  template:
    metadata:
      labels:
        app: srv-auth
    spec:
      containers:
        - name: srv-auth
          image: srv-auth //downloadable image
---
apiVersion: v1
kind: Service
metadata:
  name: srv-auth
spec:
  selector:
    app: srv-auth
  ports:
    - name: srv-auth
      protocol: TCP
      port: 4000
      targetPort: 4000
Run Code Online (Sandbox Code Playgroud)

我发现 stackoverflow 中的相关问题但它没有解决我的问题EKS ALB 无法自动发现子网

小智 5

现在已经花了差不多2天了..

在我的例子中,我的策略 json 是 2.1.3,我安装控制器 v2.2.0

所以也许这有帮助?