Sharing an ALB with AWS Load Balancer Controller
The AWS Load Balancer Controller is one of the most popular ways to provision load balancers for services on Kubernetes automatically.
The controller’s default settings create new AWS Application Load Balancers (ALBs) for every ingress. This can quickly become expensive, especially if you have a cluster for each environment.
You can configure the AWS Load Balancer Controller to merge your Ingresses so they share a single ALB, drastically cutting costs. All you have to do is configure your services’ Ingresses
alb.ingress.kubernetes.io/group.name annotation. This annotation will group and merge all of the ingresses with that annotation into a single ALB.
You can read more about it here.
One thing to remember is that an ALB can only have 100 rules. When you hit this limit, you’ll need to create another ALB.
Like what you've read?
If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.
Not sure yet? Check out the archive.
Unsubscribe at any time.