How kubernetes-sigs/aws-load-balancer-controller works
Main Components
a. Kubernetes Cluster Components:
• AWS Load Balancer Controller Pod
• Kubernetes API Server
• Webhook Server (shown in /webhooks directory)
• Custom Resource Definitions (shown in /apis directory)
• Service and Ingress Resources
b. AWS Components:
• Application Load Balancer (ALB)
• Network Load Balancer (NLB)
• Target Groups
• Security Groups
• AWS IAM (for permissions)
Controller Architecture Layers (based on the /pkg directory)
a. Core Controller Components:
• Ingress Controller (/controllers/ingress)
• Service Controller (/controllers/service)
• TargetGroupBinding Controller (/controllers/elbv2)
b. Supporting Systems:
• Webhook System (/webhooks)
• Metrics Collection (/pkg/metrics)
• AWS Service Clients (/pkg/aws)
• Networking Management (/pkg/networking)
Interaction Flows to Illustrate
a. Control Flow:
• Kubernetes API Server → Controller (Watch/List resources)
• Controller → AWS API (Create/Update load balancers)
• Controller → Webhook Server (Validate/Mutate resources)
b. Data Flow:
• External Traffic → Load Balancer → Kubernetes Services
• Load Balancer → Target Groups → Pods
Design Elements
Use the following visual elements:
• Rectangles: For main components
• Blue: Kubernetes components
• Orange: AWS components
• Green: Controller components
• Gray: Supporting infrastructure
Key Relationships
a. Controller Interactions:
• Controller → AWS APIs
• ELBv2 API (Load Balancers)
• EC2 API (Security Groups)
• ACM (Certificates)
• WAF (Web Application Firewall)
b. Resource Management:
• Controller
• Ingress → ALB
• Service → NLB
• TargetGroupBinding → Target Groups
Implementation Details
Following subsystems:
• Resource Reconciliation Loop
• AWS Service Clients
• Security Group Management
• Certificate Management
• Health Checking
• Metrics Collection
Deployment Context
Include:
• Kubernetes Cluster Boundary
• AWS VPC Boundary
• Internet Gateway
• IAM Roles and Policies