-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.sh
executable file
·56 lines (40 loc) · 1.4 KB
/
demo.sh
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
#!/usr/bin/env bash
########################
# include the magic
########################
. demo-magic.sh
########################
# Configure the options
########################
#
# speed at which to simulate typing. bigger num = faster
#
TYPE_SPEED=30
#
# custom prompt
#
# see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences
#
DEMO_PROMPT="${BLACK}➜ ${GREEN}\W "
# hide the evidence
clear
p ">>> Get the list of pods from all namespaces <<<"
pe "kubectl get pods --all-namespaces"
p ">>> Get the list of services from all namespaces <<<"
pe "kubectl get services --all-namespaces"
p ">>> Deploy version 1 of hello world <<<"
pe "kubectl apply -f kubernetes/helloworld-v1.yaml"
p ">>> Wait for hello world pod <<<"
pe "kubectl get pods -w"
p ">>> Create a Gateway, destination rules, and virtual service to allow ‘ingress' traffic to reach the mesh <<<"
pe "kubectl apply -f kubernetes/helloworld-all-v1.yaml"
p ">>> Get the gateway external IP <<<"
pe "kubectl get svc istio-ingressgateway -n istio-system"
p ">>> Deploy v2 of hello world <<<"
pe "kubectl apply -f kubernetes/helloworld-v2.yaml"
p ">>> Wait for v2 hello world pod <<<"
pe "kubectl get pods -w"
p ">>> Route the traffic: 50% to v1 and 50% to v2 <<<"
pe "kubectl apply -f kubernetes/helloworld-50-50.yaml"
p ">>> Route all traffic to v1 <<<"
pe "kubectl apply -f kubernetes/helloworld-all-v1.yaml"