# Service mesh with Istio You can use [Istio](https://istio.io) to enable [service mesh features](https://cloud.google.com/service-mesh/docs/overview) such as traffic management, observability, and security. Istio can be provisioned using Cloud Service Mesh (CSM), the Open Source Software (OSS) istioctl tool, or via other Istio providers. You can then label individual namespaces for sidecar injection and configure an Istio gateway to replace the frontend-external load balancer. # Setup The following CLI tools needs to be installed and in the PATH: - `gcloud` - `kubectl` - `kustomize` - `istioctl` (optional) 1. Set-up some default environment variables. ```sh PROJECT_ID="" REGION=" 9555/TCP 49s service/cartservice ClusterIP 10.68.184.25 7070/TCP 49s service/checkoutservice ClusterIP 10.68.177.213 5050/TCP 49s service/currencyservice ClusterIP 10.68.249.87 7000/TCP 49s service/emailservice ClusterIP 10.68.205.123 5000/TCP 49s service/frontend ClusterIP 10.68.94.203 80/TCP 48s service/istio-gateway-istio LoadBalancer 10.68.147.158 35.247.123.146 15021:30376/TCP,80:30332/TCP 45s service/kubernetes ClusterIP 10.68.0.1 443/TCP 65m service/paymentservice ClusterIP 10.68.114.19 50051/TCP 48s service/productcatalogservice ClusterIP 10.68.240.153 3550/TCP 48s service/recommendationservice ClusterIP 10.68.117.97 8080/TCP 48s service/redis-cart ClusterIP 10.68.189.126 6379/TCP 48s service/shippingservice ClusterIP 10.68.221.62 50051/TCP 48s ``` 1. Find the external IP address of your Istio gateway. ```sh INGRESS_HOST="$(kubectl get gateway istio-gateway \ -o jsonpath='{.status.addresses[*].value}')" ``` 1. Navigate to the frontend in a web browser. ``` http://$INGRESS_HOST ``` # Additional service mesh demos using Online Boutique - [Canary deployment](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/istio-canary-gke) - [Security (mTLS, JWT, Authorization)](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/security-intro) - [Cloud Operations (Stackdriver)](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/istio-stackdriver) - [Stackdriver metrics (Open source Istio)](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/stackdriver-metrics) # Related resources - [Deploying classic istio-ingressgateway in ASM](https://cloud.google.com/service-mesh/docs/gateways#deploy_gateways) - [Uninstall Istio via istioctl](https://istio.io/latest/docs/setup/install/istioctl/#uninstall-istio) - [Uninstall Cloud Service Mesh](https://cloud.google.com/service-mesh/docs/uninstall)