-
Notifications
You must be signed in to change notification settings - Fork 0
/
gateway.yaml
59 lines (59 loc) · 1.04 KB
/
gateway.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: ingress-gateway-k3s
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: http2
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: nginx-vs
spec:
hosts:
- "*"
gateways:
- ingress-gateway-k3s
http:
- match:
- uri:
prefix: "/b"
route:
- destination:
host: nginx-service
subset: v2
- match:
- uri:
prefix: "/"
route:
- destination:
host: nginx-service
subset: v1
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: nginx-dr
spec:
host: nginx-service
trafficPolicy:
loadBalancer:
simple: RANDOM
subsets:
- name: v1
labels:
version: A
trafficPolicy:
loadBalancer:
simple: LEAST_CONN
- name: v2
labels:
version: B