Amazon EKS — ALB Ingress

less than 1 minute read

ALB Ingress

The Application Load Balancer (ALB) is a Layer 7 (HTTP/HTTPS) load balancer. It supports path-based routing, host-based routing, redirects, and authentication.


Basic ALB Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip      # Pod IPs directly
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 80
$ kubectl apply -f ingress.yaml
$ kubectl get ingress
NAME         CLASS   HOSTS   ADDRESS                                      PORTS
my-ingress   alb     *       k8s-default-myingres-xxxxx.us-east-1.elb.amazonaws.com   80

Target Types

Type How It Works Pros Cons
ip (recommended) ALB sends to pod IP directly Faster, skips kube-proxy Requires VPC CNI
instance ALB sends to NodePort Works with any CNI Extra hop through kube-proxy

Key Annotations

Annotation Description Example
scheme Internet-facing or internal internet-facing
target-type ip or instance ip
certificate-arn ACM certificate for HTTPS arn:aws:acm:...
listen-ports Ports to listen on '[{"HTTPS":443}]'
ssl-redirect Redirect HTTP to HTTPS "443"
group.name Share ALB across Ingresses my-group

Common Mistakes

Mistake Impact
Missing alb.ingress.kubernetes.io/scheme Defaults to internal
No subnet tags on public subnets ALB creation fails
Using instance target type Adds latency, more complex
One ALB per Ingress (no grouping) Expensive ($18/month per ALB)

What’s Next?

TCP load balancing: NLB Services.