Skip to content

Instantly share code, notes, and snippets.

@rvennam
Created May 5, 2020 14:05
Show Gist options
  • Save rvennam/778d3e9067ff6c57a614ba72a3b086b8 to your computer and use it in GitHub Desktop.
Save rvennam/778d3e9067ff6c57a614ba72a3b086b8 to your computer and use it in GitHub Desktop.
THINK Isito Demo
#!/bin/bash
set -x
# clean
kubectl config use-context mydemocluster
kubectl label namespace stock-trader istio-injection-
kubectl delete pods --all
kubectl delete -f ./trader-gateway.yaml
kubectl delete -f ./trader-vs.yaml
kubectl delete -f ./stock-quote-deploy.yaml
kubectl delete -f ./trader-deploy.yaml
kubectl delete -f ./trader-deploy-v2.yaml
kubectl delete -f ./mtls.yaml
ibmcloud ks cluster addon disable istio --cluster mydemocluster -f
sleep 200s
kubectl get pods -n istio-system
kubectl get ns
echo "---"
# Install Istio
# ibmcloud ks cluster addon enable istio --cluster mydemocluster
# sleep 120s
kubectl get pods -n istio-system -o wide
##
sleep 30s
##
kubectl apply -f ./stock-quote-deploy.yaml
kubectl apply -f ./trader-deploy.yaml
sleep 100s
kubectl get pods
#!/bin/bash
set -x
# What got installed?
kubectl get pods,svc -n istio-system
istioctl version
echo "---"
# Install Gateway
cat trader-gateway.yaml
kubectl apply -f ./trader-gateway.yaml
kubectl apply -f ./trader-vs.yaml
kubectl get svc -n istio-system
sleep 10s
export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -L http://$INGRESS_HOST/trader
echo "---"
# Add one pod to mesh
istioctl x add-to-mesh service trader-service
sleep 60s
kubectl get pods
curl -L http://$INGRESS_HOST/trader
echo "---"
# Describe
istioctl x describe service trader-service
echo "---"
# Add all pods to mesh
kubectl get deployments
kubectl label namespace stock-trader istio-injection=enabled
kubectl apply -f ./trader-deploy.yaml
kubectl delete pods --all
sleep 60s
kubectl get pods
curl -L http://$INGRESS_HOST/trader
echo "---"
# Deploy V2
kubectl apply -f ./trader-deploy-v2.yaml
kubectl apply -f ./trader-dr.yaml
# Browser Traffic Shift
kubectl apply -f ./trader-vs-browser.yaml
# VS 80-20
istioctl x analyze -k trader-vs-80-20.yaml
# MTLS
kubectl apply -f ./mtls.yaml
# jmeter
# Dashboards
# ibmcloud ks nlb-dns-create --cluster mydemocluster --ip $INGRESS_HOST
# kubectl get secret <SECRET_NAME> --namespace=default --export -o yaml > mysecret.yaml
# kubectl apply -f ./mysecret.yaml -n istio-system
# kubectl delete pod -n istio-system -l istio=ingressgateway
# kubectl apply -f ./trader-gateway-tls.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment