touati ahmed
touati ahmed

Reputation: 401

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 ?

Upvotes: 4

Views: 6526

Answers (1)

Howard_Roark
Howard_Roark

Reputation: 4326

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.

Upvotes: 8

Related Questions