-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-http.sh
35 lines (25 loc) · 1.11 KB
/
test-http.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
set -e
CONTEXT=clust1
kubectl create --context="$CONTEXT" namespace sample
kubectl label --context="$CONTEXT" namespace sample \
istio-injection=enabled
kubectl apply --context="$CONTEXT" \
-f samples/sleep/sleep.yaml -n sample
kubectl apply --context="$CONTEXT" -n sample \
-f istio-config/http-ingress/clust1-helloworld-stub.yaml
CONTEXT=clust2
kubectl create --context="$CONTEXT" namespace sample
kubectl label --context="$CONTEXT" namespace sample \
istio-injection=enabled
kubectl apply --context="$CONTEXT" \
-f samples/helloworld/helloworld.yaml \
-l service=helloworld -n sample
kubectl apply --context="$CONTEXT" \
-f samples/helloworld/helloworld.yaml \
-l version=v2 -n sample
kubectl apply --context="$CONTEXT" -n sample \
-f istio-config/http-ingress/clust2-helloworld-gateway.yaml
#curl -s -I -HHost:helloworld.sample.svc.cluster.local http://127.0.0.1:80/hello
#curl -s -I -HHost:helloworld.sample.com http://127.0.0.1:3002/hello
#curl -s -I -HHost:helloworld.sample.svc.cluster.local http://127.0.0.1:80/hello
#curl -H Host:helloworld.sample.com http://localhost:80/hello