Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change service type to ALB in AWS EKS?

I have a deployment and serivce of my application running in my AWS EKS cluster the service is exposed as loadbalancer of type NLB by adding this annotation service.beta.kubernetes.io/aws-load-balancer-type: nlb however when i tried to switch it to ALB by changing the annotation to service.beta.kubernetes.io/aws-load-balancer-type: alb it created a classic loadbalancer which means that this annotation is not taken into consideration, so is there any way to expose the service on ALB ?

like image 600
touati ahmed Avatar asked Oct 26 '25 16:10

touati ahmed


1 Answers

You need to use the ALB Ingress Controller.

The AWS ALB Ingress Controller for Kubernetes is a controller that triggers the creation of an Application Load Balancer (ALB) and the necessary supporting AWS resources whenever an Ingress resource is created on the cluster with the kubernetes.io/ingress.class: alb annotation.

This is the git-repo, and these are the annotations you can include on your Ingress, and this is the helm chart you can use to deploy it if you prefer.

As an anecdote, it works great. The only downside is it creates one ALB per Ingress. To get around this I have been using the merge-ingress-controller in conjunction with it, which results in one ALB for multiple ingresses.

like image 108
Howard_Roark Avatar answered Oct 29 '25 16:10

Howard_Roark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!