2021-10-04 13:46:08 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: supersecret
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
data:
|
|
|
|
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
|
|
|
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
|
|
|
|
|
|
|
---
|
|
|
|
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
|
|
|
|
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-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
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9080
|
2021-11-09 10:34:06 +00:00
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: HTTPRoute
|
|
|
|
group: gateway.networking.k8s.io
|
2021-10-04 13:46:08 +00:00
|
|
|
namespaces:
|
|
|
|
from: All
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
- name: https
|
|
|
|
protocol: HTTPS
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 9443
|
|
|
|
tls:
|
2021-11-09 10:34:06 +00:00
|
|
|
certificateRefs:
|
|
|
|
- kind: Secret
|
|
|
|
name: supersecret
|
|
|
|
group: ""
|
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: HTTPRoute
|
|
|
|
group: gateway.networking.k8s.io
|
2021-10-04 13:46:08 +00:00
|
|
|
namespaces:
|
|
|
|
from: All
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
- 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:
|
|
|
|
from: All
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
- name: tls-10000
|
|
|
|
protocol: TLS
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 10000
|
|
|
|
hostname: tls.foo.example.com
|
|
|
|
tls:
|
2021-11-09 10:34:06 +00:00
|
|
|
certificateRefs:
|
|
|
|
- kind: Secret
|
|
|
|
name: supersecret
|
|
|
|
group: ""
|
|
|
|
allowedRoutes:
|
|
|
|
kinds:
|
|
|
|
- kind: TCPRoute
|
|
|
|
group: gateway.networking.k8s.io
|
2021-10-04 13:46:08 +00:00
|
|
|
namespaces:
|
|
|
|
from: All
|
2021-11-09 10:34:06 +00:00
|
|
|
|
|
|
|
- name: tls-11000
|
|
|
|
protocol: TLS
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 11000
|
|
|
|
hostname: pass.tls.foo.example.com
|
|
|
|
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: Same
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: HTTPRoute
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: http-app-default
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
sectionName: http
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
- name: my-gateway
|
|
|
|
sectionName: https
|
|
|
|
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: whoami
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 80
|
|
|
|
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-default
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
sectionName: tcp
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
- name: my-gateway
|
|
|
|
sectionName: tls-10000
|
|
|
|
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: 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
|
|
|
|
sectionName: tls-11000
|
|
|
|
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: HTTPRoute
|
2024-01-09 09:28:05 +00:00
|
|
|
apiVersion: gateway.networking.k8s.io/v1
|
2021-10-04 13:46:08 +00:00
|
|
|
metadata:
|
|
|
|
name: http-app-bar
|
|
|
|
namespace: bar
|
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
parentRefs:
|
|
|
|
- name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
sectionName: http
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
- name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
sectionName: https
|
|
|
|
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: whoami-bar
|
2021-10-04 13:46:08 +00:00
|
|
|
port: 80
|
|
|
|
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-gateway
|
|
|
|
namespace: default
|
|
|
|
sectionName: tcp
|
|
|
|
kind: Gateway
|
|
|
|
group: gateway.networking.k8s.io
|
|
|
|
- name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
sectionName: tls-10000
|
|
|
|
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: ""
|
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
|
|
|
|
sectionName: tls-11000
|
|
|
|
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: ""
|