Do I need AWS ALB for application running in EKS?

1/1/2021

I was using AWS ECS fargate for running my application. I am migrating to AWS EKS. When I use ECS, I deployed a ALB to route request to my service in ECS cluster.

In kubernete, I read this doc https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer, it seems that Kubernete itself has a loadbalance service. And it seems that it creates an external hostname and IP address.

so my question is do I need to deploy AWS ALB? If no, how can I pub this auto-generated hostname in route53? Does it change if I redeploy the service?

-- Joey Yi Zhao
amazon-ecs
amazon-eks
amazon-web-services
kubernetes

4 Answers

1/24/2021

As already mentioned from the other guys, yes it is NOT required but it is very helpful to use an ALB.

There are a couple of different solutions to that.. my favorite solution is

  • Use an Ingress Controller like the ingress-nginx (there are multiple different Ingress Controllers available for Kubernetes, a very good comparison is provided here
  • Configure the IngressController Service to use NodePort and use a port like 30080
  • Create an own AWS ALB with Terraform for an example and add the NodePort 30080 to the TargetGroup
  • Create a Ingress resource to configure the IngressController

enter image description here

If you still have some questions, just ask them here :)

-- Julian Kleinhans
Source: StackOverflow

6/24/2021

No you don't need ALB and yes, you can use Route53 in an automated manner. Here's a nice article that describes the latter: https://www.padok.fr/en/blog/external-dns-route53-eks

-- Vladimir
Source: StackOverflow

1/1/2021

Yes you need it to create Kubernetes Ingress using AWS ALB Ingress Controller, the following link explain how use ALB as Ingress controller in EKS: This

-- Asri Badlah
Source: StackOverflow

1/1/2021

You don't strictly need an AWS ALB for apps in your EKS cluster, but you probably want it.

When adopting Kubernetes, it is handy to manage some infrastructure parts from the Kubernetes cluster in a similar way to how you mange apps and in some cases there are a tight coupling between the app and configuration of your load balancer, therefore it makes sense to manage the infrastructure the same way.

A Kubernetes Service of type LoadBalancer corresponds to a network load balancer (also known as L4 load balancer). There is also Kubernetes Ingress that corresponds to an application load balancer (also known as L7 load balancer).

To use an ALB or Ingress in Kubernetes, you also need to install an Ingress Controller. For AWS you should install AWS Load Balancer Controller, this controller now also provides features in case you want to use a network load balancer, e.g. by using IP-mode or expose services using an Elastic IP. Using a pre-configured IP should help with using Route53.

See the EKS docs about EKS network load balancing and EKS application load balancing

-- Jonas
Source: StackOverflow