File tree Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Expand file tree Collapse file tree 2 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ apiVersion: v1
2
2
kind : Service
3
3
metadata :
4
4
name : mostly-hello
5
+ namespace : prod
5
6
labels :
6
7
app : hello
7
8
spec :
@@ -13,6 +14,7 @@ apiVersion: v1
13
14
kind : Service
14
15
metadata :
15
16
name : mostly-howdy
17
+ namespace : prod
16
18
labels :
17
19
app : howdy
18
20
spec :
@@ -24,6 +26,7 @@ apiVersion: v1
24
26
kind : Service
25
27
metadata :
26
28
name : howdy
29
+ namespace : prod
27
30
labels :
28
31
app : greeting
29
32
spec :
@@ -37,6 +40,7 @@ apiVersion: v1
37
40
kind : Service
38
41
metadata :
39
42
name : hello
43
+ namespace : prod
40
44
labels :
41
45
app : greeting
42
46
spec :
@@ -50,6 +54,7 @@ apiVersion: v1
50
54
kind : Service
51
55
metadata :
52
56
name : talker
57
+ namespace : prod
53
58
labels :
54
59
app : greeting
55
60
spec :
Original file line number Diff line number Diff line change @@ -356,19 +356,36 @@ All scripts used in this section are in the `manifests/appmesh/scripts` director
356
356
357
357
kubectl create -f virtualservice.yaml
358
358
359
- . Create services :
359
+ . Create deployments :
360
360
361
361
kubectl create -f app-hello-howdy.yaml
362
362
363
+ . Create services:
364
+
365
+ kubectl create -f services.yaml
366
+
363
367
=== Traffic Shifting
364
368
365
- . Invoke the service:
369
+ . Find the name of the talker pod:
370
+
371
+ kubectl get pods -nprod -lgreeting=talker
372
+
373
+
374
+ . Exec into the talker pod:
375
+
376
+ kubectl exec -nprod <YOUR_TALKER_POD> -it bash
377
+
378
+ . Invoke the mostly-howdy service to get back mostly howdy:
379
+
380
+ while [ 1 ]; do curl http://mostly-howdy.prod.svc.cluster.local:8080/hello; echo;done
381
+
382
+ . CTRL-C to break the loop.
383
+
384
+ . Invoke the mostly-hello service to get back mostly hello:
385
+
386
+ while [ 1 ]; do curl http://mostly-howdy.prod.svc.cluster.local:8080/hello; echo;done
366
387
367
- for i in {1..50}
368
- do
369
- curl -q http://$(kubectl get svc/greeting -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'):8080/hello
370
- echo
371
- done
388
+ . CTRL-C to break the loop.
372
389
373
390
== Service Mesh using Istio
374
391
You can’t perform that action at this time.
0 commit comments