Hands-on with Envoy Gateway · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
Setup
kind create cluster --name gw-lab | Local test cluster |
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.10.0 -n envoy-gateway-system --create-namespace | Install Envoy Gateway and the Gateway API CRDs |
kubectl get gateway -A | Is the Gateway PROGRAMMED, with an address? |
kubectl port-forward -n envoy-gateway-system svc/<envoy-svc> 8080:80 | Reach the gateway from your laptop |
Testing
curl -H 'Host: api.example.test' localhost:8080/orders | Send a request for a hostname without DNS |
curl --resolve api.example.test:8443:127.0.0.1 --cacert tls.crt https://api.example.test:8443/ | HTTPS with the right SNI and your own CA |
Ways to authenticate at the edge
API key | Simple shared secret per consumer; easy to leak; good for server-to-server partners |
JWT (OIDC) | Signed token from an identity provider; gateway checks signature, issuer, audience, expiry |
mTLS client certificate | Strong machine identity; certificate lifecycle needed |
External authorization | Gateway asks a service (OPA, custom) for every request; most flexible, adds latency |
JWT checks
Signature | Made with the issuer's private key; verified with its public keys (JWKS) |
iss / aud | Issued by the expected identity provider, for this API |
exp / nbf | Not expired, already valid |
claimToHeaders | Pass verified claims (tenant, plan) to backends as headers |
Kinds of limits
Rate limit | Requests per second or minute; protects capacity from bursts |
Quota | Total usage per day or month; enforces the plan and billing |
Concurrency limit | Requests in flight at once; protects slow backends |
Cost-based limit | Expensive calls count more than cheap ones |
Where counters live
Local | In each gateway replica: fast, no dependency, but N replicas allow N× the limit |
Global | Shared store (Redis via a rate-limit service): accurate across replicas, one more dependency |
Responses
429 Too Many Requests | The client is over its limit |
Retry-After: 38 | Seconds until the client may try again |
x-ratelimit-limit / -remaining / -reset | Limit, what's left, seconds to reset |
Timeouts and retries
HTTPRoute timeouts.request | Total time for the request, including retries |
BackendTrafficPolicy retry.numRetries | How many extra attempts |
retry.retryOn | Which failures to retry (status codes, connect-failure, reset, ...) |
retry.perRetry.timeout / backOff | Limit each attempt; wait between attempts |
Protection
circuitBreaker | Caps on connections, pending and parallel requests to a backend |
healthCheck.passive (outlier detection) | Eject a pod that keeps failing |
Weights 90/10, 0/100 | Canary, then blue/green switch |
RequestMirror filter | Copy traffic to a new version; ignore its responses |