Istio — Part 3

Margaryta Chepiga
Open Source Adventure
5 min readJul 19, 2018
“A bright neon on a brick wall in a store” by Austin Chan on Unsplash

Installation of Istio with Ansible

As I already mention in the first part of Istio installation, prerequisites to install Istio control panel on Kubernetes are Ansible and Kubernetes.

Please note, there a lot different ways how you can install Istio. To see the list of all available ways, please visit Istio Docs.

According to the official Istio documentation, to install it I need to run the following:

$ ansible-playbook main.yml -e '{"cluster_flavour": "k8s", "cmd_path": "~/kubectl"}'

However, when I tried to run, I got the following error:

The error itself is not the biggest issue, the biggest issue is that:

I also tried googling the error in other ways, after searching for a while, I still couldn’t find anything that suits my situation. Error message is pretty self-explanatory. Therefore, I went to Ansible documentation to see what do I do next.

I wrote some articles about all the things I have done & what I have learned:

I though that the problem was with non-existing playbook ( before/during I was doing those things in two posts above). However, once I created Ansible Playbook and run it with the command, as it says on the official Istio documentation, I realized that I was wrong. Wrong from the very beginning. I know that anyone barely reads me, so I won’t feel guilty for misleading people unintentionally :D

After all the work I have done, the result was the following:

It just run my playbook. It didn’t install Istio.

To sum up:

  • After two weeks of installing Istio, I still haven’t installed Istio
  • Most probably everything I have done so far was totally wrong
  • Istio must write a better documentation, or I do need finally get some sleep

The most important question is what to do next? Should I just gave up? I definitely could. I could go to sleep right now, before 3 am and wake up after 7 am. I could just move on with my life, cause everything seems so complicated, unusual, time consuming, and ungrateful.

But I won’t. You should always remember the reason why you are doing something. All the things I am doing in my life, are for myself. When I think about them in this perspective, I realize that there is no “complicated, unusual, time consuming, and ungrateful”, there is only a challenge that I gave to myself. To push my own limits, to become smarter, to gain new experiences, to become a better version of myself. There is no place for give up here.

Now, when I finally done talking, let’s get back to business.

This time I am going to the Quick Start page of Istio Documentation.

Since, I am not an enterprise, and I want to deploy locally. The best option for me is to install Istio through Minikube. I wrote another blog post about Minikube installation on Ubuntu.

Installing Istio with Minikube

After I installed Minikube, to install Istio locally I need to run the following:

$ minikube start \ --extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt" \ --extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \ --extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" \ --kubernetes-version=v1.10.0

Make sure, that you stopped you minikube before you run the command.

To make sure your minikube is running, use the following command:

$ minikube status

To make sure that your kubectl points to your minikube cluster, use this command:

$ kubectl config use-context minikube

Next step is to download Istio, which you can do with this command:

$ curl -L https://git.io/getLatestIstio | sh -

Next we need to add Istio to our PATH variable:

$ export PATH="$PATH:/home/margaret/istio-0.8.0/bin"

To check the PATH:

$ echo $PATH

Next step is to change the directory to the Istio package:

$ cd istio-0.8.0/

Next command will install Istio and enforce mutual TSL authentication:

$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml

Verifying the Installation

$ kubectl get svc -n istio-system

When you run this command you need to make sure that the following services are deployed:

  • istio-pilot
  • istio-ingressgateway
  • istio-policy
  • istio-telemetry
  • prometheus
  • istio-sidecar-injector

Next, you need to make sure that corresponding Kubernetes pods are deployed and all containers are up and running:

$ kubectl get pods -n istio-system

Congratulations! Finally we have successfully installed Istio!

--

--

Margaryta Chepiga
Open Source Adventure

Software Developer, known as overexcited girl who is passionate about technology