2021-10-04 13:46:08 +00:00
|
|
|
---
|
|
|
|
kind: GatewayClass
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: my-gateway-class
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
controllerName: traefik.io/gateway-controller
|
2021-10-04 13:46:08 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: my-tcp-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
2021-11-09 10:34:06 +00:00
|
|
|
listeners: # Use GatewayClass defaults for listener definition.
|
|
|
|
- name: tcp
|
|
|
|
protocol: TCP
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9000
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TCPRoute
|
|
|
|
group: gateway.networking.k8s.io
|
2021-10-04 13:46:08 +00:00
|
|
|
namespaces:
|
2021-11-09 10:34:06 +00:00
|
|
|
from: All
|
2021-10-04 13:46:08 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: TCPRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: tcp-app-default
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-tcp-gateway
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
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: TCPRoute
|
2021-11-09 10:34:06 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: tcp-app-bar
|
|
|
|
namespace: bar
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-tcp-gateway
|
|
|
|
namespace: default
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
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: ""
|