2020-12-15 15:40:05 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: supersecret
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
data:
|
|
|
|
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
|
|
|
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: GatewayClass
|
|
|
|
apiVersion: networking.x-k8s.io/v1alpha1
|
|
|
|
metadata:
|
|
|
|
name: my-gateway-class
|
|
|
|
spec:
|
|
|
|
controller: traefik.io/gateway-controller
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: Gateway
|
|
|
|
apiVersion: networking.x-k8s.io/v1alpha1
|
|
|
|
metadata:
|
|
|
|
name: my-gateway
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
gatewayClassName: my-gateway-class
|
|
|
|
listeners: # Use GatewayClass defaults for listener definition.
|
|
|
|
- protocol: HTTPS
|
2021-05-20 09:50:12 +00:00
|
|
|
port: 9001
|
|
|
|
hostname: foo.example.com
|
2020-12-15 15:40:05 +00:00
|
|
|
tls:
|
2021-05-20 09:50:12 +00:00
|
|
|
mode: Terminate # Default mode
|
2020-12-15 15:40:05 +00:00
|
|
|
certificateRef:
|
|
|
|
kind: Secret
|
|
|
|
name: supersecret
|
|
|
|
group: core
|
|
|
|
routes:
|
2021-05-20 09:50:12 +00:00
|
|
|
kind: TLSRoute
|
2020-12-15 15:40:05 +00:00
|
|
|
namespaces:
|
|
|
|
from: Same
|
|
|
|
selector:
|
2021-05-20 09:50:12 +00:00
|
|
|
matchLabels:
|
|
|
|
app: tls-app
|
2020-12-15 15:40:05 +00:00
|
|
|
|
|
|
|
---
|
2021-05-20 09:50:12 +00:00
|
|
|
kind: TLSRoute
|
2020-12-15 15:40:05 +00:00
|
|
|
apiVersion: networking.x-k8s.io/v1alpha1
|
|
|
|
metadata:
|
2021-05-20 09:50:12 +00:00
|
|
|
name: tls-app-1
|
2020-12-15 15:40:05 +00:00
|
|
|
namespace: default
|
|
|
|
labels:
|
2021-05-20 09:50:12 +00:00
|
|
|
app: tls-app
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
|
|
|
rules:
|
2021-05-20 09:50:12 +00:00
|
|
|
- forwardTo:
|
|
|
|
- serviceName: whoamitcp
|
|
|
|
port: 9000
|
2020-12-15 15:40:05 +00:00
|
|
|
weight: 1
|