Chapter 4. Kiali Operator provided by Red Hat 4.1. Using Kiali Operator provided by Red Hat Once you have added your application to the mesh, you can use Kiali Operator provided by Red Hat to view the data flow through your application. 4.1.1. About Kiali You can use Kiali Operator provided by Red Hat to view configurations, monitor traffic, and analyze traces in a single console. It is based on the open source Kiali project. Kiali Operator provided by Red Hat is the management console for Red Hat OpenShift Service Mesh. It provides dashboards, observability, and robust configuration and validation capabilities. It shows the structure of your service mesh by inferring traffic topology and displays the health of your mesh. Kiali provides detailed metrics, powerful validation, access to Grafana, and strong integration with the Red Hat OpenShift distributed tracing platform (Tempo). 4.1.2. Installing the Kiali Operator provided by Red Hat The following steps show how to install the Kiali Operator provided by Red Hat. Warning Do not install the Community version of the Operator. The Community version is not supported. Prerequisites Access to the Red Hat OpenShift Service Mesh web console. Procedure Log in to the Red Hat OpenShift Service Mesh web console. Navigate to Operators OperatorHub . Type Kiali into the filter box to find the Kiali Operator provided by Red Hat. Click Kiali Operator provided by Red Hat to display information about the Operator. Click Install . On the Operator Installation page, select the stable Update Channel. Select All namespaces on the cluster (default) . This installs the Operator in the default openshift-operators project and makes the Operator available to all projects in the cluster. Select the Automatic Approval Strategy. Note The Manual approval strategy requires a user with appropriate credentials to approve the Operator installation and subscription process. Click Install . The Installed Operators page displays the Kiali Operator's installation progress. 4.1.3. Configuring OpenShift Monitoring with Kiali The following steps show how to integrate the Kiali Operator provided by Red Hat with user-workload monitoring. Prerequisites Red Hat OpenShift Service Mesh is installed. User-workload monitoring is enabled. See Enabling monitoring for user-defined projects . OpenShift Monitoring has been configured with Service Mesh. See "Configuring OpenShift Monitoring with Service Mesh". Kiali Operator provided by Red Hat 1.89 is installed. Procedure Create a ClusterRoleBinding resource for Kiali: Example ClusterRoleBinding configuration apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kiali-monitoring-rbac roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-monitoring-view subjects: - kind: ServiceAccount name: kiali-service-account namespace: istio-system Create a Kiali resource and point it to your Istio instance: Example Kiali resource configuration apiVersion: kiali.io/v1alpha1 kind: Kiali metadata: name: kiali-user-workload-monitoring namespace: istio-system spec: external_services: prometheus: auth: type: bearer use_kiali_token: true thanos_proxy: enabled: true url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091 When the Kiali resource is ready, get the Kiali URL from the Route by running the following command: USD echo "https://USD(oc get routes -n istio-system kiali -o jsonpath='{.spec.host}')" Follow the URL to open Kiali in your web browser. 4.1.4. Integrating Red Hat OpenShift distributed tracing platform with Kiali Operator provided by Red Hat You can integrate Red Hat OpenShift distributed tracing platform with Kiali Operator provided by Red Hat, which enables the following features: Display trace overlays and details on the graph. Display scatterplot charts and in-depth trace/span information on detail pages. Integrated span information in logs and metric charts. Offer links to the external tracing UI. 4.1.4.1. Configuring Red Hat OpenShift distributed tracing platform with Kiali Operator provided by Red Hat After Kiali Operator provided by Red Hat is integrated with Red Hat OpenShift distributed tracing platform, you can view distributed traces in the Kiali console. Viewing these traces can provide insight into the communication between services within the service mesh, helping you understand how requests are flowing through your system and where potential issues might be. Prerequisites You installed Red Hat OpenShift Service Mesh. You configured distributed tracing platform with Red Hat OpenShift Service Mesh. Procedure Update the Kiali resource spec configuration for tracing: Example Kiali resource spec configuration for tracing spec: external_services: tracing: enabled: true 1 provider: tempo use_grpc: false in_cluster_url: http://tempo-sample-query-frontend.tempo:3200 url: https://tempo-sample-query-frontend-tempo.apps-crc.testing 2 1 Enable tracing. 2 The OpenShift route for Jaeger UI must be created in the Tempo namespace. You can either manually create it for the tempo-sample-query-frontend service, or update the Tempo custom resource with .spec.template.queryFrontend.jaegerQuery.ingress.type: route . Save the updated spec in kiali_cr.yaml . Run the following command to apply the configuration: USD oc patch -n istio-system kiali kiali --type merge -p "USD(cat kiali_cr.yaml)" Example output: kiali.kiali.io/kiali patched Verification Run the following command to get the Kiali route: USD oc get route kiali ns istio-system Navigate to the Kiali UI. Navigate to Workload Traces tab to see traces in the Kiali UI. Additional resources Configuring OpenShift Monitoring with Service Mesh Configuring Red Hat OpenShift distributed tracing data collection with Service Mesh

Commands:
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kiali-monitoring-rbac roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-monitoring-view subjects: - kind: ServiceAccount name: kiali-service-account namespace: istio-system
apiVersion: kiali.io/v1alpha1 kind: Kiali metadata: name: kiali-user-workload-monitoring namespace: istio-system spec: external_services: prometheus: auth: type: bearer use_kiali_token: true thanos_proxy: enabled: true url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
echo "https://USD(oc get routes -n istio-system kiali -o jsonpath='{.spec.host}')"
spec: external_services: tracing: enabled: true 1 provider: tempo use_grpc: false in_cluster_url: http://tempo-sample-query-frontend.tempo:3200 url: https://tempo-sample-query-frontend-tempo.apps-crc.testing 2
oc patch -n istio-system kiali kiali --type merge -p "USD(cat kiali_cr.yaml)"
kiali.kiali.io/kiali patched
oc get route kiali ns istio-system