We have already seen an example of a service graph earlier in this chapter (Figure 7.3). Istio provides another utility service called servicegraph,
which is able to generate a similar service graph without the help of tracing. To enable access to that service, we again need to set up port forwarding, which we can do with this Makefile
target:
$ make service-graph kubectl -n istio-system port-forward $(kubectl get pod -n istio-system -l app=servicegraph -o jsonpath='{.items[0].metadata.name}') 8088:8088 Forwarding from 127.0.0.1:8088 -> 8088 Forwarding from [::1]:8088 -> 8088
This allows us to access the service at http://localhost:8088/
. However, the service does not have a home page in the version of Istio we are using, so we need to access specific URLs. We will take a look at two different graph visualizations provided by Istio: a force-directed graph accessible at http://localhost:8088/force/forcegraph.html
and a Graphviz-based visualization...