2021-10-04 13:46:08 +00:00
|
|
|
---
|
|
|
|
kind: GatewayClass
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: my-gateway-class
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
controllerName: traefik.io/gateway-controller
|
2021-10-04 13:46:08 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +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: tls
|
|
|
|
protocol: TLS
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9001
|
|
|
|
tls:
|
|
|
|
mode: Passthrough
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TLSRoute
|
|
|
|
group: gateway.networking.k8s.io
|
2021-10-04 13:46:08 +00:00
|
|
|
namespaces:
|
|
|
|
from: All
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: TLSRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: tls-app-default
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
hostnames:
|
|
|
|
- foo.default
|
2021-10-04 13:46:08 +00:00
|
|
|
rules:
|
2021-11-09 10:34:06 +00:00
|
|
|
- backendRefs:
|
|
|
|
- name: whoamitcp
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9000
|
|
|
|
weight: 1
|
2021-11-09 10:34:06 +00:00
|
|
|
kind: Service
|
|
|
|
group: ""
|
2021-10-04 13:46:08 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: TLSRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: tls-app-bar
|
|
|
|
namespace: bar
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
hostnames:
|
|
|
|
- foo.bar
|
2021-10-04 13:46:08 +00:00
|
|
|
rules:
|
2021-11-09 10:34:06 +00:00
|
|
|
- backendRefs:
|
|
|
|
- name: whoamitcp-bar
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9000
|
|
|
|
weight: 1
|
2021-11-09 10:34:06 +00:00
|
|
|
kind: Service
|
|
|
|
group: ""
|