Visualizing Istio External Traffic With Kiali
Suppose that you have an application using several third party services to store files, send messages, write tweets, etc. It is useful to know how much traffic is going off your mesh to these services, for example, you might want to know how many requests are directed to twitter or how much data is being sent to Dropbox. Also knowing if these requests are successful or if they fail.
Istio provides a resource called Service Entry. It allows to plug additional services into your mesh so that other services can access these manually defined resources. These resources can be part of your mesh (e.g. VMs) or services external to the mesh (e.g. Twitter, Dropbox, etc).
We are going to use Istio’s Bookinfo example to show you how to observe external services. You can install it by following the instructions found on Istio’s docs. Once you have it installed and you are able to drive traffic to productpage service, you can see what we call the “Versioned app graph” by going to Kiali.
Configuring external trafficUsing Bookinfo example, there is a service that could optionally request the book information using Google API, to enable it run the following command:oc set env deployment/details-v1 ENABLE_EXTERNAL_BOOK_SERVICE=trueNow the service requests the book details from Google API instead of using a fixed set of values. Lets configure the ServiceEntry to be able to see it in Kiali.kubectl apply -f https://gist.github.com/josejulio/68ccb1162231af3e9f298f746b5f5b96/raw/bc5090305f068ad95bea2d81a1121a04a32682a6/googleapi-se.yamlNow that the ServiceEntry has been created, we can test it by sending requests to Bookinfo and check Kiali’s graph page again.