Installing Istio
As stated in the prerequisites, you should have istioctl installed on your machine. If you haven't done this yet, please follow the instructions at https://istio.io/latest/docs/setup/install/istioctl/.
Istio can be installed in various ways, but for this lab, we will use istioctl to install the latest stable version. This will install the Istio control plane components in the istio-system namespace. Istio provides various installation profiles that can be used depending on your use case. As this is a very basic lab, we will use the default profile, which will install the Istio control plane and the ingress gateway.
To install Istio, run the following command:
istioctl install --set profile=default -y
After some time, the installation should be complete and you should see output similar to this:
❯ istioctl install --set profile=default -y
|\
| \
| \
| \
/|| \
/ || \
/ || \
/ || \
/ || \
/ || \
/______||__________\
____________________
\__ _____/
\_____/
✔ Istio core installed ⛵️
✔ Istiod installed 🧠
✔ Ingress gateways installed 🛬
✔ Installation complete
To verify that all pods are running, execute:
kubectl get pods -n istio-system
You should see output similar to this:
NAME READY STATUS RESTARTS AGE
istio-ingressgateway-7467975f4-kqtqk 1/1 Running 0 97s
istiod-6b85d5b49d-jzk4z 1/1 Running 0 105s
Throughout this lab, we will use some extensions that are not part of the default installation. Therefore, we will enable some additional features in Istio. These include:
- Kiali: A web-based UI for managing and visualizing the service mesh.
- Grafana: A tool for visualizing metrics and logs.
- Prometheus: A monitoring and alerting toolkit.
To install these components, run the following commands:
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.27/samples/addons/kiali.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.27/samples/addons/grafana.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.27/samples/addons/prometheus.yaml
After a few moments, you should see the new pods in the istio-system namespace:
❯ k get pods -n istio-system
NAME READY STATUS RESTARTS AGE
grafana-6c689999f9-vp9sk 1/1 Running 0 16s
istio-ingressgateway-7467975f4-kqtqk 1/1 Running 0 5m56s
istiod-6b85d5b49d-jzk4z 1/1 Running 0 6m4s
kiali-7fc595c8b7-mwsb5 0/1 Running 0 17s
prometheus-798549cbb5-tr4b9 2/2 Running 0 16s
We will use Kiali later in this lab to get some insights into the service mesh.
To access Kiali, we need to port-forward the service to our local machine. In a new terminal window, run:
kubectl port-forward svc/kiali -n istio-system 20001:20001
You should see the Kiali interface by navigating to http://localhost:20001. When clicking through the interface, you will see that there is some information about the Istio components, but not much about our demo application. This is because Istio is not yet managing any traffic in our demo application. This will be done in the next steps.
You have installed Istio in your cluster. It's important to note that at this point, Istio is not yet managing any traffic. In the next steps, we will configure Istio to manage the traffic between the components of our demo application.
