Member-only story

How to Use One AWS ALB for Multiple Applications with Kubernetes

Nidhi
4 min readFeb 1, 2025

--

In this blog, we’ll explore how to utilize a single AWS Application Load Balancer (ALB) to expose multiple Kubernetes services, offering a more cost-effective solution when managing multiple applications in your Kubernetes cluster. By leveraging host-based routing in ALB configurations, we can route traffic to different services using a single load balancer.

Why Use One Load Balancer for Multiple Services? In a typical Kubernetes setup, each service is often assigned its own load balancer, which can become quite expensive, especially when running multiple services in your cluster. A more efficient solution is to utilize a single ALB and configure it to handle traffic for multiple services using path-based or host-based routing rules.

In this tutorial, we’ll walk through the process of setting up a Kubernetes cluster where two services — an Nginx application and a game application — are exposed using a single AWS ALB. We’ll be using Kubernetes Ingress resources to achieve this.

Check out my Youtube video for the demo

Prerequisites:

  • Kubernetes cluster (either AWS EKS or any other setup)
  • kubectl installed
  • AWS CLI configured
  • Basic understanding of Kubernetes Ingress and Load Balancers
  • Use Github repo from here for the Kubernetes YAML configuration

Step 1: Deploy…

--

--

Nidhi
Nidhi

Written by Nidhi

Devops Automation Enginneer

No responses yet