Observing microservice meshes with Kiali

At some point when you are developing your microservice architecture, you willneed to visualize what is happening in your service mesh. You will havequestions like “Which service is connected to which other service?” and “Howmuch traffic goes to each microservice?” But because of the loosely tied natureof microservice architectures , these questions can be difficult to answer.

Those are the kinds of question that Kiali has the ability to answer, by givingyou a big picture of the mesh, and showing the whole flow of your requests anddata.

Kiali builds upon the same concepts as Istio, and you can check theglossary for arefresher.

How does Kiali work?

Kiali taps into the data provided by Istio and OpenShift to generate itsvisualizations. It fetches ingress data (such as request tracing with Jaeger),the listing and data of the services, health indexes, and so on.

Kiali runs as a service together with Istio, and does not require any changesto Istio or Openshift configuration (besides the ones required to installIstio).

Update kiali?

A prerequisite for installing Kiali is that you must have OpenShift and Istioinstalled and configured.

Update Kiali with the following commands:

  1. # URLS for Jaeger and Grafana
  2. export JAEGER_URL="http://tracing-istio-system.$(minishift ip).nip.io"
  3. export GRAFANA_URL="http://grafana-istio-system.$(minishift ip).nip.io"
  4. echo "apiVersion: v1
  5. kind: ConfigMap
  6. metadata:
  7. name: kiali
  8. namespace: istio-system
  9. labels:
  10. app: kiali
  11. chart: kiali
  12. heritage: Tiller
  13. release: istio
  14. data:
  15. config.yaml: |
  16. istio_namespace: istio-system
  17. auth:
  18. strategy: login
  19. server:
  20. port: 20001
  21. web_root: /kiali
  22. external_services:
  23. istio:
  24. url_service_version: http://istio-pilot:8080/version
  25. tracing:
  26. url: $JAEGER_URL
  27. grafana:
  28. url: $GRAFANA_URL
  29. prometheus:
  30. url: http://prometheus:9090"| kubectl apply -f -; oc delete pod -l app=kiali -n istio-system

So now we can access Kiali at kiali-istio-system.$(minishift ip).nip.io, solet’s do it:

  1. open http://kiali-istio-system.$(minishift ip).nip.io/kiali

Login Page

The default credentials are "admin/admin", but it’s recommended to change thembefore using it in production.

Generating Sample Data

To show the capabilities of Kiali, you’ll need an Istio-enabled application tobe running. For this, we can use the customer-tutorial application we createdearlier.

To generate data for it, we can curl it with this command:

  1. curl http://istio-ingressgateway-istio-system.$(minishift ip).nip.io/customer

Service Graph

After you login, you should see the Service Graph page:

Service Graph Page

It shows a graph with all the microservices, connected by the requests goingthrough then. On this page, you can see how the services interact with eachother.

Applications

Click the Applications link in the left navigation. On this page you canview a listing of all the services that are running in the cluster, andadditional information about them, such as health status.

Application Listing Page

Click on the "customer" application to see its details:

Service Details

By hovering the icon on the Health section, you can see the health of a service(a service is considered healthy) when it’s online and responding to requestswithout errors:

Health Status

By clicking on Outbound Metrics or Inbound Metrics, you can also see themetrics for an application, like so:

Application Metrics

Workloads

Click the Workloads link in the left navigation. On this page you can viewa listing of all the workloads are present on your applications.

Workload Listing

Click on the customer workload. Here you can see details for the workload,such as the pods and services that are included in it:

Workload Details

By clicking Outbound Metrics and Inbound Metrics, you can check themetrics for the workload. The metrics are the same as the Application ones.

Services

Click on the Services link in the left navigation. Here, you can see thelisting of all services.

Service Listing

Click on the customer service. You can, on this page, see the details ofthe service, such as metrics, traces, workloads, virtual services,destination rules and so on:

Service Details