AWS Load Balancer Controller now supports Kubernetes Gateway API, offering a modern, type-safe approach to managing Application and Network Load Balancers on EKS. This update addresses the limitations of the older Ingress API by providing improved validation, clearer error handling, and better role separation through custom resource definitions (CRDs), enhancing GitOps workflows and multi-tenant cluster management.
Read original on InfoQ ArchitectureThe AWS Load Balancer Controller has achieved General Availability (GA) with support for the Kubernetes Gateway API. This is a significant architectural shift from the legacy Ingress API, providing a more robust and developer-friendly way to manage external traffic into Kubernetes clusters hosted on AWS. The Gateway API aims to standardize advanced routing features and multi-tenant scenarios that were cumbersome or impossible with annotations-based Ingress configurations.
Before the Gateway API, configuring AWS Load Balancers through Kubernetes involved cramming JSON into annotations on Ingress resources. This approach suffered from several drawbacks: lack of schema validation, poor IDE support, and runtime failures due to malformed strings. The new Gateway API introduces type-safe Custom Resource Definitions (CRDs) that provide compile-time validation, significantly improving reliability and developer experience.
Architectural Benefit: Shift-Left Validation
The move from annotations to CRDs with schema validation represents a 'shift-left' in error detection. Configuration errors are caught at `kubectl apply` time rather than mysteriously failing during runtime, leading to faster debugging cycles and more stable deployments. This is crucial for robust GitOps practices.
The Gateway API is structured around three key resources, promoting clear separation of concerns:
The AWS Load Balancer Controller now handles both Layer 4 (TCP, UDP, TLS via NLB) and Layer 7 (HTTP, gRPC via ALB) routing using Gateway API resources, completing AWS's coverage alongside VPC Lattice for east-west traffic. Key new features include cross-namespace routing, automatic TLS certificate discovery from AWS Certificate Manager, and support for weighted traffic splitting. While AWS-specific CRDs (like TargetGroupConfiguration) allow for cloud-specific features, the core Gateway API resources are portable across various implementations, including Google Cloud's GKE, NGINX, Envoy Gateway, and Istio, promoting consistent routing logic across different environments.