Up and Running with Istio within minutes
- Aditya Samant

- Feb 21, 2024
- 2 min read
Updated: Feb 26, 2024

This blog post gets you hands-on with Istio in a flash.
Istio Overview
Istio is an open source service mesh that layers transparently onto distributed applications running on Kubernetes. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services.
In this post, I'll explain the bare minimum steps needed in order to successfully install and test an Istio Installation on your local machine.
Prerequisites
Installation
Create a new minikube cluster:
minikube start -p minikube-istioStart a minikube tunnel to provide a load balancer for use by Istio:
minikube tunnel -p minikube-istioDownload Istio as per the instructions in this link:
curl -L https://istio.io/downloadIstio | sh -Add the istio-*/bin directory to your environment PATH variable and check the version:
istioctl versionThe output should be similar to:
no ready Istio pods in "istio-system"
1.20.3Install Istio with the demo profile:
istioctl install --set profile=demoAfter successful installation, you should have an istio-system namespace available
kubectl get nsYou should see an output similar to:
NAME STATUS AGE
kube-system Active 4m22s
default Active 4m22s
kube-public Active 4m22s
kube-node-lease Active 4m22s
istio-system Active 2m49sCheck the Pods inside the istio-system namespace:
kubectl get pods -n istio-systemYou should see the istiod, istio-ingressgateway and the istio-egressgateway pods up and running.
Automatic Injection of Sidecars
Automatic injection of sidecar containers is achieved by setting the label istio-injection=enabled on namespaces.
kubectl label ns default istio-injection=enabledCreate a simple deployment of nginx to test the sidecar injection:
kubectl create deploy my-nginx --image=nginxGet the details of the pod:
kubectl get podYou will see two containers for the Pod, as it includes the sidecar container:
NAME READY STATUS RESTARTS AGE
my-nginx-b8dd4cd6-4kh4x 2/2 Running 0 24sDelete this deployment as we do not need it anymore:
kubectl delete deploy my-nginxDemo Application
We will deploy an application with two Spring Boot microservices named customers and rest-client.
The customers microservice is a CRUD microservice that provides APIs to manipulate customer data.
The rest-client microservice acts as a client to the customers microservice and invokes it using the new RestClient in Spring Framework 6.1.x
Create the Gateway Resource:
kubectl apply -f https://raw.githubusercontent.com/adityasamant25/courses/main/istio/demo/gateway.yamlCreate the Deployment and Service for the rest-client application:
kubectl apply -f https://raw.githubusercontent.com/adityasamant25/courses/main/istio/demo/rest-client.yamlCreate the Deployment and Service for the customers application:
kubectl apply -f https://raw.githubusercontent.com/adityasamant25/courses/main/istio/demo/customers-v1.yamlCreate a Virtual Service for the rest-client and bind it to the Gateway resource:
kubectl apply -f https://raw.githubusercontent.com/adityasamant25/courses/main/istio/demo/rest-client-vs.yamlRun CURL against the following URL:
You should see an output of 3 customers as follows:
[{"id":1,"firstName":"John","lastName":"Doe"},{"id":2,"firstName":"Alice","lastName":"Smith"},{"id":3,"firstName":"Bob","lastName":"Stevens"}]Summary
Congratulations! You have a functional Istio cluster up and running on your local machine.
You can now use this cluster to further explore the various features of Istio.
Cleanup
kubectl delete deploy rest-client customers-v1
kubectl delete svc customers rest-client
kubectl delete vs rest-client
kubectl delete gateway gatewayWhat's Next
Dig deeper into Istio's main features such as Observability, Traffic Management and Security.





Nice Article