You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,28 +251,29 @@ spec:
251
251
```
252
252
253
253
Now, we should define the route and [create a VirtualService](https://istio.io/latest/docs/reference/config/networking/virtual-service/) to route the traffic to Nginx `Service`:
254
-
```
254
+
```
255
255
apiVersion: networking.istio.io/v1beta1
256
256
kind: VirtualService
257
257
metadata:
258
-
name: nginx
258
+
name: nginx
259
+
namespace: istio-system
259
260
spec:
260
-
hosts:
261
-
- "*"
262
-
gateways:
263
-
- nginx-gateway
264
-
http:
265
-
- name: "nginx-test"
266
-
match:
267
-
- uri:
268
-
prefix: "/nginx-test"
269
-
rewrite:
270
-
uri: "/"
271
-
route:
272
-
- destination:
273
-
host: nginx.default.svc.cluster.local
274
-
port:
275
-
number: 80
261
+
hosts:
262
+
- "*"
263
+
gateways:
264
+
- shared-gateway
265
+
http:
266
+
- name: "nginx-test"
267
+
match:
268
+
- uri:
269
+
prefix: "/nginx-test"
270
+
rewrite:
271
+
uri: "/"
272
+
route:
273
+
- destination:
274
+
host: nginx.default.svc.cluster.local
275
+
port:
276
+
number: 80
276
277
```
277
278
278
279
The `VirtualService` defines a prefix `prefix: "/nginx-test"` so that all requests
0 commit comments