Skip to content

Commit c865f48

Browse files
authored
Merge pull request aws-samples#41 from geremyCohen/master
Added namespaces to services, modified docs to include adding services separately and execing into ingress pod to test.
2 parents 1a0c428 + 39f64c2 commit c865f48

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

manifests/appmesh/services.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: mostly-hello
5+
namespace: prod
56
labels:
67
app: hello
78
spec:
@@ -13,6 +14,7 @@ apiVersion: v1
1314
kind: Service
1415
metadata:
1516
name: mostly-howdy
17+
namespace: prod
1618
labels:
1719
app: howdy
1820
spec:
@@ -24,6 +26,7 @@ apiVersion: v1
2426
kind: Service
2527
metadata:
2628
name: howdy
29+
namespace: prod
2730
labels:
2831
app: greeting
2932
spec:
@@ -37,6 +40,7 @@ apiVersion: v1
3740
kind: Service
3841
metadata:
3942
name: hello
43+
namespace: prod
4044
labels:
4145
app: greeting
4246
spec:
@@ -50,6 +54,7 @@ apiVersion: v1
5054
kind: Service
5155
metadata:
5256
name: talker
57+
namespace: prod
5358
labels:
5459
app: greeting
5560
spec:

readme.adoc

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,19 +356,36 @@ All scripts used in this section are in the `manifests/appmesh/scripts` director
356356

357357
kubectl create -f virtualservice.yaml
358358

359-
. Create services:
359+
. Create deployments:
360360

361361
kubectl create -f app-hello-howdy.yaml
362362

363+
. Create services:
364+
365+
kubectl create -f services.yaml
366+
363367
=== Traffic Shifting
364368

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
366387

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.
372389

373390
== Service Mesh using Istio
374391

0 commit comments

Comments
 (0)