Ingress Controller

Complete Guide to Ingress, Ingress Controller, and AWS Load Balancer in EKS

In this guide, we'll cover: βœ… Ingress and Ingress Controller βœ… AWS Load Balancer Controller βœ… Scenarios with Real-time Examples βœ… Common Issues and Solutions


πŸš€ Step 1: What is Ingress?

In Kubernetes, an Ingress allows external traffic to reach services inside the cluster using a single entry point (hostname/domain).

πŸ”Ή Key Features of Ingress:

  • Routes traffic based on hostnames, paths, or headers

  • Works with TLS (HTTPS)

  • Can handle multiple services behind a single Load Balancer


πŸš€ Step 2: Setting Up an Ingress Controller

To use Ingress, we need an Ingress Controller that watches Ingress resources and routes traffic accordingly.

πŸ”Ή Common Ingress Controllers:

  1. AWS Load Balancer Controller (Recommended for EKS)

  2. NGINX Ingress Controller

  3. Traefik Ingress Controller

For EKS, we use AWS Load Balancer Controller because it integrates with AWS ALB (Application Load Balancer).


πŸš€ Step 3: Deploy AWS Load Balancer Controller

Step 3.1: Install IAM Policy for Load Balancer Controller

AWS ALB Controller needs IAM permissions to create and manage ALB.

πŸ”Ή Create IAM policy:

πŸ”Ή Attach this policy to your EKS IAM Role:

βœ… Verify IAM Role:


Step 3.2: Install the AWS Load Balancer Controller

πŸ”Ή Install using Helm:

βœ… Check if the controller is running:


πŸš€ Step 4: Deploy an Application with Ingress

Step 4.1: Deploy a Sample Application

πŸ”Ή Create a simple Nginx deployment and service:

πŸ”Ή Apply the configuration:


Step 4.2: Configure Ingress with AWS ALB

πŸ”Ή Create an Ingress resource for ALB:

πŸ”Ή Apply the Ingress rule:

βœ… Verify that the ALB was created:


πŸš€ Step 5: Add HTTPS to Ingress (TLS Termination)

AWS ALB supports TLS termination using ACM certificates.

πŸ”Ή Create an ACM Certificate:

πŸ”Ή Update the Ingress resource with TLS:

βœ… Apply changes:

βœ… Verify HTTPS works:


πŸš€ Step 6: Common Issues & Fixes

❌ Issue 1: AWS ALB is not created

πŸ”Ή Check Ingress status:

βœ… Solution: Ensure correct annotations and IAM permissions.


❌ Issue 2: Ingress Shows default backend - 404

πŸ”Ή Check if the service is reachable:

βœ… Solution: Ensure Ingress backend service matches your service name.


❌ Issue 3: DNS Resolution Not Working

πŸ”Ή Check ALB DNS:

βœ… Solution: Add an A record in Route 53 pointing to the ALB.


❌ Issue 4: SSL Certificate Not Working

πŸ”Ή Check certificate status:

βœ… Solution: Ensure the certificate is issued and validated.


❌ Issue 5: High Latency in Load Balancer

πŸ”Ή Check AWS ALB logs:

βœ… Solution: Increase ALB capacity by using a higher instance type.


πŸš€ Summary

βœ” Configured AWS Load Balancer Controller βœ” Deployed an application with Ingress βœ” Secured the Ingress with HTTPS βœ” Troubleshooted common ALB issues


πŸš€ Next: Do you want to configure Web Application Firewall (WAF) or Advanced Security for Ingress?

Last updated