Kubernetes failed to ensure load balancer: error creating load balancer listener: "DuplicateListener

Viewed 1193

I was having ingress installed but I got some error so I tried to reinstall niginx I run that first comment

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.47.0/deploy/static/provider/aws/deploy.yaml

but as I have a custom configuration I tried to install with helm after the run for the first command

helm install nginx nginx-stable/nginx-ingress -f ingress-values.yaml

ingress-values.yaml

controller:
  service:
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "MY_ARN"
      service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
      service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
    httpsPort:
      targetPort: 8443

but all hosts went down now and I got that error

Error syncing load balancer: failed to ensure load balancer: error creating load balancer listener: "DuplicateListener: A listener already exists on this port for this load balancer 'arn:aws:elasticloadbalancing:us-east-2:XX:loadbalancer/net/XX/XX'\n\tstatus code: 400, request id: e9ef7a56-d3f7-473c-adbb-1dd0759078e5"
1 Answers

This happens cause I install nginx twice in different namespaces

I fixed it by remove helm install

Related