2020-12-15 15:40:05 +00:00
|
|
|
---
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2020-12-15 15:40:05 +00:00
|
|
|
kind: GatewayClass
|
|
|
|
metadata:
|
|
|
|
name: my-gateway-class
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
controllerName: traefik.io/gateway-controller
|
2020-12-15 15:40:05 +00:00
|
|
|
|
|
|
|
---
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2020-12-15 15:40:05 +00:00
|
|
|
kind: Gateway
|
|
|
|
metadata:
|
|
|
|
name: my-gateway
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners:
|
2021-11-09 10:34:06 +00:00
|
|
|
- name: https
|
|
|
|
protocol: HTTPS
|
2020-12-15 15:40:05 +00:00
|
|
|
port: 443
|
|
|
|
tls:
|
2021-11-09 10:34:06 +00:00
|
|
|
certificateRefs:
|
|
|
|
- kind: Secret
|
|
|
|
name: mysecret
|
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
---
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2020-12-15 15:40:05 +00:00
|
|
|
kind: HTTPRoute
|
|
|
|
metadata:
|
2021-11-09 10:34:06 +00:00
|
|
|
name: http-app
|
2020-12-15 15:40:05 +00:00
|
|
|
namespace: default
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
hostnames:
|
2021-11-09 10:34:06 +00:00
|
|
|
- whoami
|
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
rules:
|
|
|
|
- matches:
|
|
|
|
- path:
|
|
|
|
type: Exact
|
|
|
|
value: /foo
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
backendRefs:
|
|
|
|
- name: whoami
|
2020-12-15 15:40:05 +00:00
|
|
|
port: 80
|
|
|
|
weight: 1
|