简体   繁体   中英

AWS Nginx Ingress creating Classic Load Balancer instead of Application Load Balancer

I am trying to setup Application Load Balancer to forward traffic to Nginx Ingress controller in AWS. To set up Nginx Ingress controller, I am using this YML which I got it from the installation instructions .

After deployment, everything is working fine and traffic is being forwarded to EKS pods correctly. However, the above YML file is creating ' Classic Load Balancer ' in aws where as I want to create ' Application Load Balancer '. I changed ' service.beta.kubernetes.io/aws-load-balancer-type: elb ' to ' service.beta.kubernetes.io/aws-load-balancer-type: alb ' but still it is creating classic load balancer in AWS.

Please help in setting up the desired LB. Thanks in advance.

If you want to use ALB (Application Load Balancer) instead of NLB (Network Load Balancer), you need to use AWS ALB Ingress Controller with External DNS, not the NGINX Ingress Controller. See the details in this official doc and this official AWS ALB Ingress Controller doc

I hope that answers your problems.

same issue for me with :

resource "helm_release" "ingress-nginx" {
  name       = "ingress-nginx"
  namespace  = "ingress-nginx"
  repository = "https://kubernetes.github.io/ingress-nginx"
  chart      = "ingress-nginx"
  values = [
    file("values/ingress-nginx.values.yaml")
  ]
}
controller:
  config:
    use-proxy-protocol: "true"
    use-forwarded-headers: "true"
  service:
    internal:
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
        service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
        service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
        service.beta.kubernetes.io/aws-load-balancer-type: nlb
      externalTrafficPolicy: Local

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM