Installing Istio Service Mesh
This lesson contains the step-by-step instructions for installing Istio in our Kubernetes cluster.
I already mentioned that we are going to experiment with networking and use Istio as a service mesh of choice. Now, we need to install it. Before we do that, there is a warning for those using Docker Desktop.
Only for Docker Desktop#
If you are using Docker Desktop, you need to remove Ingress from your Kubernetes cluster. The reason is simple. In Docker Desktop, both Nginx Ingress and Istio Gateway are using port 80. If we use both, there would be conflicts between the two. So, if you’re a Docker Desktop user and you kept the cluster from the previous section, please execute the commands that follow to remove Ingress.
Please execute the commands that follow only if you are re-using the Docker Desktop cluster from the previous section.
To work with Istio, you will need istioctl
. If you don’t have it already, please go to Istio Releases and install it.
Installing Istio in the Kubernetes cluster#
Now, we can install Istio inside our Kubernetes cluster.
If you’re already familiar with Istio, you know what’s coming. You can just skip the instructions and install it yourself. If you’re new to it, you will see that installing Istio is relatively easy and straightforward. All we have to do is execute istioctl manifest apply
, and that will install the default version. We will also add the --skip-confirmation
flag so that istioctl
does not ask us to confirm whether we want to install it or not.
Please execute the command that follows.
It shouldn’t take long until everything is installed. Once you see that all the resources are created, you should confirm that the external IP was assigned to the Istio Gateway service.
In most cases, at least when running Kubernetes in the cloud, external IP means that it is creating an external load balancer (LB). If you see the value of the EXTERNAL-IP
column set to <pending>
, the external LB is still being created. If that’s the case, keep re-running the previous command until you see the value of that column set to an IP.
Docker Desktop and Minikube cannot create an external load balancer, so the
EXTERNAL-IP
column will stay<pending>
forever. That’s OK. If one of those is your Kubernetes distribution of choice, you can ignore me saying that you should wait until the value of that column becomes an IP.
Retrieving the Istio Ingress host#
Now, to simplify everything, we will retrieve the Istio Ingress host and store it in a variable INGRESS_HOST
. To do that, commands will differ depending on the type of the Kubernetes cluster you have. Follow the instructions for your distribution.
For Minikube#
Please execute the commands that follow to retrieve the Istio Ingress IP if you’re using Minikube.
For Docker Desktop#
Please execute the commands that follow to retrieve the Istio Ingress IP if you’re using Docker Desktop.
For GKE or AKS#
Please execute the commands that follow to retrieve the Istio Ingress IP if you’re using GKE or AKS.
For EKS#
Please execute the commands that follow to retrieve the Istio Ingress IP if you’re using EKS.
To be on the safe side, we’ll output the INGRESS_HOST
variable and confirm that it looks okay.
If the output is an IP with an optional port (in case of Minikube) or a domain (in case of EKS), we’re done setting up Istio, and we can do some chaos. We can create and run experiments and see how they fit into networking, Ingress, and a few other concepts. But, before we do that, we still need to deploy our demo application.
The next lesson contains the instructions for deploying the demo application and Istio resources.