I have deployed node app in aws eks and everything works fine until today. when I deployed latest version today suddenly i got following error.
couldn't auto-discover subnets: UnauthorizedOperation: You are not authorized to perform this operation
{"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"}
Here is the ingress 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
Here is deployment 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
And I found that the related question in stackoverflow but it's not solved my issue EKS ALB is not to able to auto-discover subnets