EKS interview question · Most asked
How do you expose services on EKS? Explain the AWS Load Balancer Controller.
Summary
The AWS Load Balancer Controller watches Ingress (and Gateway API) resources to create Application Load Balancers, and Services of type LoadBalancer to create Network Load Balancers. With IP target mode, the load balancer sends traffic directly to pod IPs (possible because of the VPC CNI); instance mode routes through node ports.
Longer Answer
Practical points: IP mode avoids an extra hop and works with Fargate; use IngressGroups to share one ALB across many Ingresses (cost); terminate TLS with ACM certificates; add AWS WAF on the ALB for public apps; set the target group's deregistration delay and pod preStop hooks consistently for graceful shutdown; and use readiness gates so pods count as ready only once registered healthy in the target group.
The in-tree cloud provider can also create Classic or NLB load balancers, but the controller is the recommended, feature-rich option. EKS Auto Mode includes load-balancing management.
Key Points
- Ingress -> ALB; Service LoadBalancer -> NLB.
- IP target mode sends traffic to pods.
- Share ALBs with IngressGroups; ACM + WAF.
- Align deregistration delay, preStop and readiness gates.
More most-asked EKS questions
- How do you secure an EKS cluster end to end?
- EKS or ECS: how would you choose?
- How does the Amazon VPC CNI work, and why do EKS clusters run out of IP addresses?
- IRSA or EKS Pod Identity: how do pods get AWS permissions?
- Compare the EKS compute options: managed node groups, self-managed nodes, Fargate, Karpenter and EKS Auto Mode.
- How do you upgrade an EKS cluster, and what are standard and extended support?
- Why is Karpenter popular on EKS, and how does it differ from the Cluster Autoscaler?
- What is Amazon EKS, and what does AWS manage versus what do you manage?