ISTIO, Docker for windows and minikube
I have spent few hours to setup an ISTIO environment en Windows with minikube.
Following ISTIO tutorial, commands are for Linux environment. Here few technical lines to setup an environment for running ISTIO and their use-case “book-info”.
Preriquisites:
- Install latest docker for windows. (Install Docker Desktop on Windows | Docker Documentation).
- Get latest ISTIO source. (Istio / Getting StartedIstio / Getting Started).
- Get latest minikube source. (minikube start | minikube (k8s.io)).
Fix memory and cpu limit for Docker for Windows
On “Get Started” ISTIO page, it recommends to launch minikube with a minimum of :
- Memory: 16384
- CPU: 4
If you are on same case as me using WSL2, default Docker for windows values need to be leverage, to do so, you need to fill a configuration file. (.wslconfig) and store it on “%UserProfile%”.
# Settings apply across all Linux distros running on WSL 2
[wsl2]# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=18GB# Sets the VM to use two virtual processors
processors=8# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=8GB
Once file saved, you have to restart Docker for windows (quit it and start it) to take into account new configuration.
Setup minikube
- Download minikube for windows
- Install minikube following tutorial: minikube start | minikube (k8s.io)
- Once done, open a powershell as admin and execute :
minikube start — memory=16384 — cpus=4 — kubernetes-version=v1.20.2

Once done minikube will set itself as default on kubectl
Deploy ISTIO
- Download istio
- Install istio following “Get Started” : Istio / Getting Started
- Execute folllowing commands on powershell:
istioctl install — set profile=demo -y

kubectl label namespace default istio-injection=enabled

- Go to ISTIO install folder and execute following commands:
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml

Check services and pods
kubectl get services

kubectl get pods

All pods should be Running state, it can takes few minutes.
kubectl exec “$(kubectl get pod -l app=ratings -o jsonpath=’{.items[0].metadata.name}’)” -c ratings — curl -sS productpage:9080/productpage | Select-String “<title>.*</title>”

Create bookinfo gateaway
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml

Perform istioctl to make sure everything is ok
istioctl analyze

Once this is done, open a new powershell as admin to create a minikube tunnel

Check external ip address
kubectl get service -n istio-system

You can access bookinfo on you browser at the following address : http://127.0.0.1/productpage

Sources :