A Microservice Architecture breaks up the monolith into many smaller pieces that are composed together. Patterns to secure the communication between services like fault tolerance (via timeout, retry, circuit breaking, etc.) have come up as well as distributed tracing to be able to see where calls are going.
A service mesh can now provide these services on a platform level and frees the application writers from those tasks. Routing decisions are done at the mesh level.
Kiali works with Istio to visualise the service mesh topology, features like circuit breakers or request rates.
Kiali also includes Jaeger Tracing to provide distributed tracing out of the box.
If you are not a developer but just want to run something to see Kiali, then go to https://www.kiali.io for some instructions.
You could also try to use our hack script to quickly install OpenShift, Istio, and Kiali like this:
wget https://raw.githubusercontent.com/kiali/kiali/master/hack/cluster-openshift.sh
sh cluster-openshift.sh --kiali-enabled true upIf you do not already have an Istio-enabled application to test with, you can install one using the Bookinfo Demo install script provided here as a convenience.
There are other demo applications to choose from as well: see some examples.
Kiali is published as a docker image on Docker hub at kiali/kiali
See the LICENSE file.
|
Note
|
These build instructions assume you have the following installed on your system: (1) Go Programming Language which must be at least version 1.8.3, (2) git, (3) Docker, and (4) make. To run Kiali on OpenShift after you build it, it is assumed you have a running OpenShift environment available to you. If you do not, you can find a set of instructions on how to set up OpenShift below. To run Kiali on Kubernetes after you built it, it is assumed you have a running Kubernetes environment available to you. |
To build Kiali:
-
Clone this repository inside a GOPATH. These instructions will use the example GOPATH of "/source/kiali/kiali" but you can use whatever you want. Just change the first line of the below instructions to use your GOPATH.
export GOPATH=/source/kiali/kiali
mkdir -p $GOPATH
cd $GOPATH
mkdir -p src/github.com/kiali
cd src/github.com/kiali
git clone git@github.com:kiali/kiali
export PATH=${PATH}:${GOPATH}/bin-
Install Glide - the Go dependency management tool that Kiali uses to build itself
cd ${GOPATH}/src/github.com/kiali/kiali
make dep-install-
Tell the dependency manager tool to update the Kiali dependencies
NoteYou should only run this command if you add, remove, or modify a dependency. If you are simply git cloning and building from source, you should skip this step.
cd ${GOPATH}/src/github.com/kiali/kiali
make dep-update-
Build Kiali
cd ${GOPATH}/src/github.com/kiali/kiali
make build-
At this point you can run the Kiali tests
cd ${GOPATH}/src/github.com/kiali/kiali
make test|
Note
|
If you want to quickly get up and running to play with Kiali and do not wish to git clone the repository, or build anything, see https://kiali.org for instructions. If you do not have a cluster environment (e.g. OpenShift) yet, grab the cluster-openshift.sh convenience script and run it to quickly start an OpenShift cluster environment with Istio installed. If you do not have a service mesh to test with, grab the install-bookinfo-demo.sh convenience script to download and install the Istio Bookinfo Demo service mesh. |
Note: There is a secret variable in the configuration called TOKEN_SECRET, be careful with this secret.
The following section assumes that the user has OpenShift Origin installed.
The OpenShift Origin Documentation will outline all the steps required.
Create the Kiali docker image through the "docker-build" make target:
cd ${GOPATH}/src/github.com/kiali/kiali
make docker-build|
Note
|
Before deploying and running Kiali, you must first install and deploy Istio. Required Istio Version: 1.0. There are a few places that you can reference in order to learn how to do this such as here, here, and here. |
|
Note
|
The following make targets assume that the oc command is available in the user’s PATH and that the user is logged in. If you have istiooc instead, create a symlink in your PATH pointing oc to your istiooc binary.
|
The deploy and undeploy commands are automated in the Makefile. The following will undeploy an old installation of Kiali, if available, and deploy a new one:
make openshift-deploy
If you need to set the JAEGER or GRAFANA services, set the URL in the environment variable JAEGER_URL and GRAFANA_URL
If you want to remove Kiali from your OpenShift environment, you can do so by running the following command:
make openshift-undeployThe following section assumes that the user has Kubernetes installed.
Create the Kiali docker image through the "docker-build" make target:
cd ${GOPATH}/src/github.com/kiali/kiali
make docker-buildNote that if you are using minikube, you can build the docker image and push it directly into the minikube docker daemon using the alternative make target minikube-docker:
cd ${GOPATH}/src/github.com/kiali/kiali
make minikube-docker|
Note
|
Before deploying and running Kiali, you must first install and deploy Istio. Required Istio Version: 1.0. There are a few places that you can reference in order to learn how to do this such as here, here, and here. |
|
Note
|
The following make targets assume that the kubectl command is available in the user’s PATH.
|
|
Note
|
In order to deploy on Kubernetes and to be able to access the deployed service, you must ensure you have Ingress support. If you are using minikube, you need to run minikube addons enable ingress and add kiali as a hostname in your /etc/hosts via something like this command: echo "$(minikube ip) kiali" | sudo tee -a /etc/hosts
|
The deploy and undeploy commands are automated in the Makefile. The following will undeploy an old installation of Kiali, if available, and deploy a new one:
make k8s-deploy
If you need to set the JAEGER or GRAFANA services, set the URL in the environment variable JAEGER_URL and GRAFANA_URL
If you want to remove Kiali from your Kubernetes environment, you can do so by running the following command:
make k8s-undeploySometimes you may want to run Kiali outside of any container environment, perhaps for debugging purposes. To do this, run:
cd ${GOPATH}/src/github.com/kiali/kiali
make install
make runThe "install" target installs the Kiali executable in your GOPATH /bin directory so you can run it outside of the Makefile:
cd ${GOPATH}/src/github.com/kiali/kiali
make install
${GOPATH}/bin/kiali -config <your-config-file>