gateway-api

5 commands

5 shown

TLS Gateway listener with cert ref Terminate TLS at the gateway via certificateRefs to a Secret kubectl apply -f - <<'EOF' apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: {name: gw, namespace: <ns>} spec: gatewayClassName: <name> listeners: - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: [{name: tls-cert}] EOF #gateway-api#tls#security#network Check HTTPRoute Accepted condition Inspect Accepted/ResolvedRefs status to debug why a route is not attached kubectl describe httproute <name> -n <ns> | grep -A8 Conditions #gateway-api#troubleshooting#debug#network Inventory Gateway API resources One-shot view of classes, gateways and routes across all namespaces kubectl get gatewayclass,gateway,httproute -A #gateway-api#network#k8s Weighted canary HTTPRoute Split traffic 90/10 across stable and canary backends by weight kubectl apply -f - <<'EOF' apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: {name: web, namespace: <ns>} spec: parentRefs: [{name: gw}] rules: - backendRefs: - {name: web-stable, port: 80, weight: 90} - {name: web-canary, port: 80, weight: 10} EOF #gateway-api#network#ci#k8s Allow cross-namespace route with ReferenceGrant Permit HTTPRoute in edge ns to target Services in backend ns kubectl apply -f - <<'EOF' apiVersion: gateway.networking.k8s.io/v1beta1 kind: ReferenceGrant metadata: {name: allow-routes, namespace: backend} spec: from: [{group: gateway.networking.k8s.io, kind: HTTPRoute, namespace: edge}] to: [{group: "", kind: Service}] EOF #gateway-api#network#security#k8s
no commands match