Use Kiali to visualize traffic graph under Kmesh

Preparation

  1. Make default namespace managed by Kmesh.

  2. Deploy bookinfo as sample application and sleep as curl client.

  3. [optional] Install service granularity waypoint for service reviews.

The above steps could refer to Install Waypoint | Kmesh. When installing Istio, we recommend installing Istio ambient mode instead of only installing Istiod, because Kiali currently depends on Istio components to work.

  1. Deploy prometheus that record Kmesh metrics as Istio standard metrics.

This Prometheus addon leveages the Prometheus recording rules and relabeling configurations to convert Kmesh L4 metrics into Istio standard metrics, so that Kiali could visualize these metrics.

kubectl apply -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/prometheus_recording_istio.yaml
  1. Deploy Kiali which reads metrics from the Prometheus.
kubectl apply -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/kiali.yaml

Generate some continuous traffic between applications in the mesh

kubectl exec deploy/sleep -- sh -c "while true; do curl -s http://productpage:9080/productpage | grep reviews-v.-; sleep 1; done"

Use Kiali to visualize the traffic graph of services

  1. Use the port-forward command to forward traffic to kiali.
kubectl port-forward --address 0.0.0.0 svc/kiali 20001:20001 -n kmesh-system
Forwarding from 0.0.0.0:20001 -> 20001
  1. View the traffic graph in Kiali from browser.

Visit Traffic Graph panel. Select the default namespace at the top of left.

In this traffic topology graph, the blue lines represent TCP traffic, which is proxied by Kmesh, while the green lines represent HTTP traffic, which is proxied by Waypoint. For more information about Kiali’s traffic topology graph, please refer to Kiali’s documentation.

Cleanup

  1. Remove prometheus and grafana:
kubectl delete -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/prometheus_recording_istio.yaml
kubectl delete -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/kiali.yaml
  1. If you are not planning to explore any follow-on tasks, refer to the Install Waypoint/Cleanup instructions to remove waypoint and shutdown the application.