2020-12-15 15:40:05 +00:00
|
|
|
---
|
|
|
|
kind: GatewayClass
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: my-gateway-class
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
controllerName: traefik.io/gateway-controller
|
2020-12-15 15:40:05 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners:
|
2021-11-09 10:34:06 +00:00
|
|
|
- name: http
|
|
|
|
protocol: HTTP
|
2020-12-15 15:40:05 +00:00
|
|
|
port: 8180
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: HTTPRoute
|
2020-12-15 15:40:05 +00:00
|
|
|
|
2021-05-20 09:50:12 +00:00
|
|
|
---
|
|
|
|
kind: Gateway
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-05-20 09:50:12 +00:00
|
|
|
metadata:
|
|
|
|
name: my-tcp-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners:
|
2021-11-09 10:34:06 +00:00
|
|
|
- name: tcp
|
|
|
|
protocol: TCP
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 8193
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TCPRoute
|
2021-05-20 09:50:12 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
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J3LzNBenZVYWpLbEkrOTlIQwp4U1dLbFRvWkZpTkhPMFBFVTl0Y3BUdWxMdTdoZDNGcWhLRFoyNll0S2p0dC9LK2VlODR6czFFQ1FRQ3oyNWlEClpCY2ZrR0FURlhjdWVzeXgvUlcyL2c4QzhtYkN6RW5oSCtYbWVBak44UFRDREF2VDNLVXltRm5MRVB6amVVYU0KRGRuSlZqc3JaNW8xK1c5WgotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-05-20 09:50:12 +00:00
|
|
|
metadata:
|
|
|
|
name: my-tls-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners:
|
2021-11-09 10:34:06 +00:00
|
|
|
- name: tls-9001
|
|
|
|
protocol: TLS
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 9001
|
|
|
|
tls:
|
|
|
|
mode: Passthrough
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TLSRoute
|
2021-05-20 09:50:12 +00:00
|
|
|
namespaces:
|
|
|
|
from: Same
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
- name: tls-9002
|
|
|
|
protocol: TLS
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 9002
|
|
|
|
tls:
|
|
|
|
mode: Terminate
|
2021-11-09 10:34:06 +00:00
|
|
|
certificateRefs:
|
|
|
|
- kind: Secret
|
|
|
|
name: supersecret
|
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TCPRoute
|
2021-05-20 09:50:12 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-05-20 09:50:12 +00:00
|
|
|
metadata:
|
|
|
|
name: my-https-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners:
|
2021-11-09 10:34:06 +00:00
|
|
|
- name: https
|
|
|
|
protocol: HTTPS
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 8443
|
|
|
|
tls:
|
|
|
|
mode: Terminate
|
2021-11-09 10:34:06 +00:00
|
|
|
certificateRefs:
|
|
|
|
- kind: Secret
|
|
|
|
name: supersecret
|
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: HTTPRoute
|
2021-05-20 09:50:12 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
---
|
|
|
|
kind: HTTPRoute
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: http-app-1
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
- name: my-https-gateway
|
2020-12-15 15:40:05 +00:00
|
|
|
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
|
2021-05-20 09:50:12 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: TCPRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-05-20 09:50:12 +00:00
|
|
|
metadata:
|
|
|
|
name: tcp-app-1
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-tcp-gateway
|
|
|
|
- name: my-tls-gateway
|
2021-05-20 09:50:12 +00:00
|
|
|
rules:
|
2021-11-09 10:34:06 +00:00
|
|
|
- backendRefs:
|
|
|
|
- name: whoamitcp
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 8080
|
|
|
|
weight: 1
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: TLSRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-05-20 09:50:12 +00:00
|
|
|
metadata:
|
|
|
|
name: tls-app-1
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-tls-gateway
|
|
|
|
hostnames:
|
|
|
|
- foo.bar
|
2021-05-20 09:50:12 +00:00
|
|
|
rules:
|
2021-11-09 10:34:06 +00:00
|
|
|
- backendRefs:
|
|
|
|
- name: whoamitcp
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 8080
|
|
|
|
weight: 1
|