4
votes

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.

3
just interested if you have tried to install nginx ingress via helm chart + specify service.beta.kubernetes.io/aws-load-balancer-type: alb annotation like here ?Vit
Thanks for the pointer. I haven't tried installing it with helm. I will try and update you.Prerak Tiwari
I tried with the helm chart..it is still creating classic alb.Prerak Tiwari

3 Answers

1
votes

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.

-2
votes

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