Chapter 8. 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
configurationapiVersion: 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:
$ echo "https://$(oc get routes -n istio-system kiali -o jsonpath='{.spec.host}')"
- Follow the URL to open Kiali in your web browser.