gcloud beta container clusters create istio-demo \
--addons=Istio --istio-config=auth=MTLS_PERMISSIVE \
--cluster-version=1.21.5-gke.1302 \
--machine-type=n1-standard-2 \
--num-nodes=4
gcloud config set project kubernetes-332720
gcloud container clusters get-credentials istio-demo
kubectl label namespace default istio-injection=enabled
kubectl apply -f bookinfo.yaml
kubectl apply -f bookinfo-gateway.yaml
kubectl get svc istio-ingressgateway -n istio-system
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}')
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
echo "$GATEWAY_URL"
echo "http://$GATEWAY_URL/productpage"
kubectl apply -f destination-rule.yaml
`
kubectl apply -f virtual-service-all-v1.yaml
kubectl apply -f virtual-service-reviews-50-v3.yaml
kubectl apply -f virtual-service-reviews-v3.yaml
kubectl apply -f virtual-service-all-v1.yaml
kubectl apply -f virtual-service-reviews-test-jason-user.yaml
kubectl get virtualservices -o yaml
kubectl get destinationrules -o yaml
https://twitter.com/vishnoitanuj
PPT: Istio Slides