Last active
February 4, 2019 14:34
-
-
Save rvennam/88a53b5601c5daee9430423959df1fff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CTX_LOCAL=demo-multicluster1 | |
export CTX_REMOTE=demo-multicluster2 | |
# Enable automatic sidecar injection for default | |
kubectl label --context=$CTX_LOCAL namespace default istio-injection=enabled | |
kubectl label --context=$CTX_REMOTE namespace default istio-injection=enabled | |
# Deploy BookInfo with no reviews v3 on LOCAL | |
kubectl apply --context=$CTX_LOCAL -f bookinfo-no-reviews-v3.yaml | |
kubectl delete --context=$CTX_LOCAL -f bookinfo-no-reviews-v3.yaml | |
# Gateway | |
kubectl apply --context=$CTX_LOCAL -f bookinfo-gateway.yaml | |
kubectl delete --context=$CTX_LOCAL -f bookinfo-gateway.yaml | |
LOCAL_GW_ADDR=$(kubectl get --context=$CTX_LOCAL svc --selector=app=istio-ingressgateway \ | |
-n istio-system -o jsonpath="{.items[0].status.loadBalancer.ingress[0].ip}") | |
open http://${LOCAL_GW_ADDR}/productpage | |
# Deploy BookInfo reviews-v3 on REMOTE | |
kubectl apply --context=$CTX_REMOTE -f bookinfo-reviews-v3.yaml | |
kubectl delete --context=$CTX_REMOTE -f bookinfo-reviews-v3.yaml | |
# Deploy BookInfo ratings on REMOTE | |
kubectl apply --context=$CTX_REMOTE -f bookinfo-ratings.yaml | |
# Check config | |
../bin/istioctl proxy-config endpoints $(kubectl get pod -l app=productpage -o jsonpath='{.items[0].metadata.name}') | grep reviews | |
# Pilot logs | |
k logs -l app=pilot -n istio-system -c discovery | |
################### | |
# BUG: | |
# Good state | |
kubectl delete --context=$CTX_REMOTE -f bookinfo-reviews-v3.yaml | |
kubectl apply --context=$CTX_REMOTE -f bookinfo-reviews-v3.yaml | |
# Can't hit v3 anymore | |
#FIX: | |
k delete pods -l istio -n istio-system | |
k delete pod -l app=productpage | |
### subsets | |
kubectl apply -f ./vs-v3.yaml | |
kubectl delete -f ./vs-v3.yaml | |
kubectl apply -f ../samples/bookinfo/networking/destination-rule-all-mtls.yaml | |
kubectl delete -f ../samples/bookinfo/networking/destination-rule-all-mtls.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment