istio
1apiVersion: gateway.networking.k8s.io/v1beta1
2kind: GatewayClass
3metadata:
4name: istio
5spec:
6controllerName: istio.io/gateway-controller
7---
8apiVersion: gateway.networking.k8s.io/v1beta1
9kind: Gateway
10metadata:
11name: gateway
12namespace: istio-system
13spec:
14addresses:
15- value: istio-ingressgateway
16type: Hostname
17gatewayClassName: istio
18listeners:
19- name: passthrough
20port: 34000
21protocol: TLS
22allowedRoutes:
23namespaces:
24from: All
25tls:
26mode: Passthrough
27- name: terminate
28hostname: "domain.example"
29port: 34000
30protocol: HTTPS
31allowedRoutes:
32namespaces:
33from: All
34tls:
35mode: Terminate
36certificateRefs:
37- name: my-cert-http
38- name: terminate-mtls
39hostname: "other.example"
40port: 34000
41protocol: HTTPS
42allowedRoutes:
43namespaces:
44from: All
45tls:
46mode: Terminate
47certificateRefs:
48- name: my-cert-http
49options:
50gateway.istio.io/tls-terminate-mode: MUTUAL
51- name: terminate-istio-mtls
52hostname: "egress.example"
53port: 34000
54protocol: HTTPS
55allowedRoutes:
56namespaces:
57from: All
58tls:
59mode: Terminate
60options:
61gateway.istio.io/tls-terminate-mode: ISTIO_MUTUAL
62---
63apiVersion: gateway.networking.k8s.io/v1alpha2
64kind: TLSRoute
65metadata:
66name: tls
67namespace: default
68spec:
69parentRefs:
70- name: gateway
71namespace: istio-system
72rules:
73- backendRefs:
74- name: httpbin
75port: 443
76---
77apiVersion: gateway.networking.k8s.io/v1alpha2
78kind: TLSRoute
79metadata:
80name: tls-match
81namespace: default
82spec:
83parentRefs:
84- name: gateway
85namespace: istio-system
86hostnames:
87- "foo.com"
88rules:
89- backendRefs:
90- name: httpbin-foo
91port: 443
92---
93apiVersion: gateway.networking.k8s.io/v1beta1
94kind: HTTPRoute
95metadata:
96name: http
97namespace: default
98spec:
99parentRefs:
100- name: gateway
101namespace: istio-system
102hostnames: ["domain.example"]
103rules:
104- backendRefs:
105- name: httpbin
106port: 80