Ingress and Load Balancing with Envoy Gateway
TOC
Overview
Envoy Gateway provides Layer 7 (L7) ingress and load balancing for Kubernetes clusters. It is based on the Kubernetes Gateway API and built atop Envoy Proxy, allowing advanced HTTP, HTTPS, gRPC, and TCP routing with full observability and policy control.
Envoy Gateway unifies the ingress traffic management model by defining GatewayClass, Gateway, and Route resources,
offering a standard, portable alternative to legacy Ingress objects.
Network Flow Architecture
-
External LoadBalancer provides an external IP that maps traffic into the cluster.
-
Envoy Gateway terminates TLS, applies routing rules, and forwards to backend services.
-
Service (ClusterIP) distributes traffic to Pods across nodes.
This architecture replaces the “Ingress Controller” with a fully Gateway-API-compliant data plane.
Configuring Routes
Defining a GatewayClass
Creating a Gateway
Learn more Configure Gateway API Gateway.
Creating HTTP Routes
Learn more Configure Gateway API Route.
Explanation
-
The Gateway exposes ports 80 and 443 for HTTP/S traffic.
-
The HTTPRoute defines routing rules based on hostname and path.
-
Multiple HTTPRoute objects can share the same Gateway.
Configuring Ingress Cluster Traffic
Envoy Gateway supports various external traffic entry modes, depending on your infrastructure.
Example Service exposing Envoy Gateway:
You can verify the external IP assigned by running:
Load Balancing Strategies
Envoy Gateway provides flexible load-balancing methods through its backend references.
Default Round-Robin
Weighted Load Balancing
Session Affinity (Sticky Sessions)
Envoy supports cookie-based or source-IP-based session affinity via policy configuration:
Learn more about BackendTrafficPolicy.
TLS and Security
TLS Termination
Handled at the Gateway listener level:
TLS Passthrough
For end-to-end encryption where Envoy forwards encrypted traffic:
mTLS Between Gateways and Services
Advanced policy CRDs can enable mTLS or client certificate validation.
Integration with MetalLB
In bare-metal clusters without cloud load balancers:
-
Configure a MetalLB IPAddressPool and L2Advertisement.
-
Ensure the Envoy Gateway Service is of type LoadBalancer.
-
MetalLB assigns an external IP automatically.
-
DNS records can then map domains (e.g., app.example.com) to the assigned IP.