Skip to content

Instantly share code, notes, and snippets.

@rvennam
Last active March 13, 2020 14:08
Show Gist options
  • Save rvennam/67d250e5ea1801812442f2ea30b27053 to your computer and use it in GitHub Desktop.
Save rvennam/67d250e5ea1801812442f2ea30b27053 to your computer and use it in GitHub Desktop.
echo "Install Istio 1.4"
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.5 sh -
cd istio-1.4.5
./bin/istioctl manifest apply --set profile=default
kubectl label namespace default istio-injection=enabled
sleep 120s
kubectl get pods -n istio-system
read -p "Press enter to continue"
echo "Install BookInfo"
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
sleep 15s
export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}')
echo http://$INGRESS_HOST/productpage
curl http://$INGRESS_HOST/productpage | grep Simple
read -p "Press enter to continue"
cd ..
echo "Upgrade to Istio 1.5"
curl -L https://istio.io/downloadIstio | sh -
cd istio-1.5.0
./bin/istioctl upgrade --skip-confirmation
sleep 120s
kubectl get pods -n istio-system
echo http://$INGRESS_HOST/productpage
curl http://$INGRESS_HOST/productpage | grep Simple
# CLEANUP
read -p "Clean up?"
./bin/istioctl manifest generate --set profile=demo | kubectl delete -f -
./samples/bookinfo/platform/kube/cleanup.sh
cd ..
rm -rf istio-1.4.5/
rm -rf istio-1.5.0/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment