2020-12-15 15:40:05 +00:00
|
|
|
---
|
|
|
|
kind: Gateway
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
2021-11-09 10:34:06 +00:00
|
|
|
listeners: # Use GatewayClass defaults for listener definition.
|
|
|
|
- name: http
|
|
|
|
protocol: HTTP
|
2020-12-15 15:40:05 +00:00
|
|
|
port: 80
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
2020-12-15 15:40:05 +00:00
|
|
|
namespaces:
|
|
|
|
from: Same
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: HTTPRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: http-app-1
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
hostnames:
|
|
|
|
- "foo.com"
|
|
|
|
rules:
|
|
|
|
- matches:
|
|
|
|
- path:
|
|
|
|
type: Exact
|
|
|
|
value: /bar
|
2021-11-09 10:34:06 +00:00
|
|
|
backendRefs:
|
|
|
|
- name: whoami
|
2020-12-15 15:40:05 +00:00
|
|
|
port: 80
|
|
|
|
weight: 1
|