API Gateways, Traffic Management & the Edge›Hands-on with Envoy Gateway · Cheat sheet & self-check

Hands-on with Envoy Gateway · wrap-up

Cheat sheet & self-check

Every command from this section on one page.

04 · Lab: your first gateway

Setup

kind create cluster --name gw-labLocal test cluster
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.10.0 -n envoy-gateway-system --create-namespaceInstall Envoy Gateway and the Gateway API CRDs
kubectl get gateway -AIs the Gateway PROGRAMMED, with an address?
kubectl port-forward -n envoy-gateway-system svc/<envoy-svc> 8080:80Reach the gateway from your laptop

Testing

curl -H 'Host: api.example.test' localhost:8080/ordersSend 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

05 · Authentication at the edge

Ways to authenticate at the edge

API keySimple 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 certificateStrong machine identity; certificate lifecycle needed
External authorizationGateway asks a service (OPA, custom) for every request; most flexible, adds latency

JWT checks

SignatureMade with the issuer's private key; verified with its public keys (JWKS)
iss / audIssued by the expected identity provider, for this API
exp / nbfNot expired, already valid
claimToHeadersPass verified claims (tenant, plan) to backends as headers

06 · Rate limiting and quotas

Kinds of limits

Rate limitRequests per second or minute; protects capacity from bursts
QuotaTotal usage per day or month; enforces the plan and billing
Concurrency limitRequests in flight at once; protects slow backends
Cost-based limitExpensive calls count more than cheap ones

Where counters live

LocalIn each gateway replica: fast, no dependency, but N replicas allow N× the limit
GlobalShared store (Redis via a rate-limit service): accurate across replicas, one more dependency

Responses

429 Too Many RequestsThe client is over its limit
Retry-After: 38Seconds until the client may try again
x-ratelimit-limit / -remaining / -resetLimit, what's left, seconds to reset

07 · Timeouts, retries and traffic management

Timeouts and retries

HTTPRoute timeouts.requestTotal time for the request, including retries
BackendTrafficPolicy retry.numRetriesHow many extra attempts
retry.retryOnWhich failures to retry (status codes, connect-failure, reset, ...)
retry.perRetry.timeout / backOffLimit each attempt; wait between attempts

Protection

circuitBreakerCaps on connections, pending and parallel requests to a backend
healthCheck.passive (outlier detection)Eject a pod that keeps failing
Weights 90/10, 0/100Canary, then blue/green switch
RequestMirror filterCopy traffic to a new version; ignore its responses