This is a minimal implementation demonstrating Envoy Gateway as an API gateway in Kubernetes, featuring multiple backend services.
-
Gateway Configuration
demo-gateway-class.yaml: Defines the GatewayClass for Envoy Gatewaydemo-gateway.yaml: Configures listeners and ports for HTTP routingdemo-http-route.yaml: Routing rules for Nginx backenddemo-http-route-echoservice.yaml: Routing rules for echoserver backend
-
Backend Services
- Nginx deployment/service (
demo-deployment-nginx.yaml,demo-service.yaml) - Echoserver deployments/services (v1/v2 with canary testing examples)
- Nginx deployment/service (
- Install Envoy Gateway
1. helm install eg oci://docker.io/envoyproxy/gateway-helm -n envoy-gateway-system --create-namespace
2. kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available- Apply configurations
1. kubectl apply -f demo-gateway-class.yaml
2. kubectl apply -f demo-gateway.yaml
3. kubectl apply -f demo-http-route.yaml # For Nginx backend- Verify deployment
1. export GATEWAY_HOST=$(kubectl get gateway/demo-gateway -o jsonpath='{.status.addresses.value}')
2. curl -H "Host: www.example.com" http://$GATEWAY_HOST- Multi-backend routing configuration
- Canary deployment examples for echoserver
- Gateway API v1 resources implementation
- Clean separation of control plane and data plane
For echoserver implementation:
1. kubectl apply -f demo-deployment-echoserver.yaml
2. kubectl apply -f demo-http-route-echoservice.yaml