Amazon EKS — AWS Load Balancer Controller

1 minute read

AWS Load Balancer Controller

The AWS Load Balancer Controller replaces the legacy in-tree AWS cloud provider for load balancing. It provisions ALBs for Ingress resources and NLBs for LoadBalancer Services.


Architecture

AWS Load Balancer Controller
┌───────────────────────────────────────────────────────────┐
│  EKS Cluster                                              │
│                                                           │
│  ┌──────────────────────┐                                 │
│  │ LB Controller Pod    │                                 │
│  │ (watches Ingress +   │                                 │
│  │  Service resources)  │                                 │
│  └────────┬─────────────┘                                 │
│           │                                               │
│           │ Sees Ingress? → Create ALB                    │
│           │ Sees Service (LB)? → Create NLB               │
│           ▼                                               │
│  ┌─────────────────────────────────────────┐              │
│  │  AWS API                                │              │
│  │  • Create/Update ALB or NLB             │              │
│  │  • Register targets (pods or nodes)     │              │
│  │  • Configure listeners, rules, certs    │              │
│  └─────────────────────────────────────────┘              │
└───────────────────────────────────────────────────────────┘

Install

# Step 1: Create IAM policy
$ curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.7.1/docs/install/iam_policy.json

$ aws iam create-policy \
    --policy-name AWSLoadBalancerControllerIAMPolicy \
    --policy-document file://iam-policy.json

# Step 2: Create IRSA
$ eksctl create iamserviceaccount \
    --cluster demo \
    --namespace kube-system \
    --name aws-load-balancer-controller \
    --attach-policy-arn arn:aws:iam::123456789012:policy/AWSLoadBalancerControllerIAMPolicy \
    --approve

# Step 3: Install with Helm
$ helm repo add eks https://aws.github.io/eks-charts
$ helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
    --namespace kube-system \
    --set clusterName=demo \
    --set serviceAccount.create=false \
    --set serviceAccount.name=aws-load-balancer-controller

Verify

$ kubectl get deployment -n kube-system aws-load-balancer-controller
NAME                           READY   UP-TO-DATE   AVAILABLE
aws-load-balancer-controller   2/2     2            2

Common Mistakes

Mistake Impact
Missing IAM policy Controller can’t create load balancers
Missing subnet tags ALB/NLB can’t find subnets
Wrong IRSA setup Permission denied errors

What’s Next?

HTTP routing: ALB Ingress.