Skip to content

Instantly share code, notes, and snippets.

@mitzen
Created May 13, 2023 04:13
Show Gist options
  • Save mitzen/c1afa9ed1f122532e0a89ad94ba63ba6 to your computer and use it in GitHub Desktop.
Save mitzen/c1afa9ed1f122532e0a89ad94ba63ba6 to your computer and use it in GitHub Desktop.
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: httpbin-gateway
spec:
gatewayClassName: istio
listeners:
- name: http
#hostname: "httpbin.example.com"
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: Same
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: httpbin
spec:
parentRefs:
- name: httpbin-gateway
#hostnames: ["httpbin.example.com"]
rules:
- matches:
- path:
type: PathPrefix
value: /status
- path:
type: PathPrefix
value: /delay
backendRefs:
- name: httpbin
port: 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment