Application Routing with K8s Ingress & AWS Load Balancer Controller
23 minIntermediate
This creates billable resources. Run it in a dev environment and destroy it when you finish. Set a budget alarm first.
Success criteria
0 of 3
What you are building#
What is Kubernetes Ingress & AWS Load Balancer Controller?#
- Kubernetes Ingress: An API object managing external HTTP/HTTPS access to services within a cluster.
- AWS Load Balancer Controller (LBC): An operator running inside EKS that monitors Ingress resources and automatically provisions AWS Application Load Balancers (ALB), Target Groups, and Listener rules on AWS.
text
INGRESS ROUTING ARCHITECTURE
Client Request (HTTP / Port 80)
|
v
+-----------------------------------------------------------------------------------+
| AWS APPLICATION LOAD BALANCER (Provisioned automatically by AWS LBC) |
+----------------------------------------+------------------------------------------+
|
| Direct Target Group Routing (target-type: ip)
v
+-----------------------------------------------------------------------------------+
| AWS EKS CLUSTER (Private Subnets) |
| Pods receive incoming traffic directly via Amazon VPC CNI |
| |
| +-------------------------------+ +---------------------------------+ |
| | Pod 1 (IP: 10.0.10.42:8000) | | Pod 2 (IP: 10.0.11.89:8000) | |
| +-------------------------------+ +---------------------------------+ |
+-----------------------------------------------------------------------------------+Steps#
Step 1: Apply Ingress Resource#
Terminal
cd 04-Kubernetes-Orchestration/Lab12-K8s-Ingress-ALB-Controller
kubectl apply -f ingress.yamlVerify it worked#
Terminal
kubectl get ingress -n nti-devopsExpected Output:
text
NAME CLASS HOSTS ADDRESS PORTS AGE
nti-django-ingress alb * k8s-ntidevops-ntidjang-a1b2c3d4e5-123456789.us-east-1.elb.amazonaws.com 80 2mClean up#
Run this even if you did not finish. Everything above is destroyable, and an account full of half-built experiments is how a surprise bill starts.
Destructive — This removes real resources. Check which environment you are in first.
Terminal
kubectl delete ingress --all -A
# The ALB is deleted by the controller, asynchronously. Confirm it is gone:
aws elbv2 describe-load-balancers --query 'LoadBalancers[].[LoadBalancerName,State.Code]' --output table
# An orphaned ALB keeps billing after the cluster is destroyed.Cost of this lab: Billable. An Ingress backed by the AWS Load Balancer Controller creates a real ALB at $0.0225/hour ($16/month) plus LCU charges — and it is created by Kubernetes, so terraform destroy will not remove it.