Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Kiali Operator provided by Red Hat
4.1. Using Kiali Operator provided by Red Hat Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
The following steps show how to install the Kiali Operator provided by Red Hat.
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.
NoteThe 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 Copia collegamentoCollegamento copiato negli appunti!
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 2.4 is installed.
Procedure
Create a
ClusterRoleBinding
resource for Kiali:Example
ClusterRoleBinding
configurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Kiali resource and point it to your Istio instance:
Example Kiali resource configuration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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}')"
$ echo "https://$(oc get routes -n istio-system kiali -o jsonpath='{.spec.host}')"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Follow the URL to open Kiali in your web browser.
- Navigate to the Traffic Graph tab to check the traffic in the Kiali UI.
4.1.4. Integrating Red Hat OpenShift distributed tracing platform with Kiali Operator provided by Red Hat Copia collegamentoCollegamento copiato negli appunti!
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 Copia collegamentoCollegamento copiato negli appunti!
After you integrate Kiali Operator provided by Red Hat with Red Hat OpenShift distributed tracing platform, you can view distributed traces in the Kiali console. Viewing traces provides 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 reside.
Prerequisites
- You installed Red Hat OpenShift Service Mesh.
- You configured distributed tracing platform with Red Hat OpenShift Service Mesh.
Procedure
Update the
Kiali
resourcespec
configuration for tracing:Example
Kiali
resourcespec
configuration for tracingCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Specifies whether tracing is enabled.
- 2
- Specifies either distributed tracing platform (Tempo) or distributed tracing platform (Jaeger). The distributed tracing platform can expose a Jaeger API or a Tempo API.
- 3
- Specifies the internal URL for the Tempo API. When you deploy the distributed tracing platform in multitenancy, include the tenant name in the URL path of the
internal_url
parameter. In this example,default
represents the tenant name. - 4
- Specifies the OpenShift route for the Jaeger UI. When you deploy the distributed tracing platform in multitenancy, the gateway creates the route. Otherwise, you must create the route in the
Tempo
namespace. You can manually create the route for thetempo-sample-query-frontend
service or update theTempo
custom resource with.spec.template.queryFrontend.jaegerQuery.ingress.type: route
. - 5
- Specifies the health check URL. Not required by default. When you deploy the distributed tracing platform in multitenancy, it does not expose the default health check URL. This is an example of a valid health URL.
- 6
- Specifies the configuration used when the access URL is
HTTPS
or requires authentication. Not required by default. - 7
- Specifies the configuration that defaults to
grafana
. Not required by default. Change tojaeger
if the KialiView in tracing
link redirects to the Jaeger console UI.
-
Save the updated
spec
inkiali_cr.yaml
. Run the following command to apply the configuration:
oc patch -n istio-system kiali kiali --type merge -p "$(cat kiali_cr.yaml)"
$ oc patch -n istio-system kiali kiali --type merge -p "$(cat kiali_cr.yaml)"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output:
kiali.kiali.io/kiali patched
kiali.kiali.io/kiali patched
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Run the following command to get the Kiali route:
oc get route kiali ns istio-system
$ oc get route kiali ns istio-system
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Navigate to the Kiali UI.
-
Navigate to Workload
Traces tab to see traces in the Kiali UI.
4.2. Using OpenShift Service Mesh Console plugin Copia collegamentoCollegamento copiato negli appunti!
The OpenShift Service Mesh Console (OSSMC) plugin extends the OpenShift Container Platform web console with a Service Mesh menu and enhanced tabs for workloads and services.
4.2.1. About OpenShift Service Mesh Console plugin Copia collegamentoCollegamento copiato negli appunti!
The OpenShift Service Mesh Console (OSSMC) plugin is an extension to OpenShift Container Platform web console that provides visibility into your Service Mesh.
The OSSMC plugin supports only one Kiali instance, regardless of its project access scope.
The OSSMC plugin provides a new category, Service Mesh, in the main OpenShift Container Platform web console navigation with the following menu options:
- Overview
- Provides a summary of your mesh, displayed as cards that represent the namespaces in the mesh.
- Traffic Graph
- Provides a full topology view of your mesh, represented by nodes and edges. Each node represents a component of the mesh and each edge represents traffic flowing through the mesh between components.
- Istio config
- Provides a list of all Istio configuration files in your mesh, with a column that provides a quick way to know if the configuration for each resource is valid.
- Mesh
- Provides detailed information about the Istio infrastructure status. It shows an infrastructure topology view with core and add-on components, their health, and how they are connected to each other.
In the web console Workloads details page, the OSSMC plugin adds a Service Mesh tab that has the following subtabs:
- Overview
- Shows a summary of the selected workload, including a localized topology graph showing the workload with all inbound and outbound edges and nodes.
- Traffic
- Shows information about all inbound and outbound traffic to the workload.
- Logs
- Shows the logs for the workload’s containers. You can see container logs individually ordered by log time and how the Envoy sidecar proxy logs relate to your workload’s application logs. You can enable the tracing span integration, which allows you to see which logs correspond to trace spans.
- Metrics
- Shows inbound and outbound metric graphs in the corresponding subtabs. All the workload metrics are here, providing a detailed view of the performance of your workload. You can enable the tracing span integration, which allows you to see which spans occurred at the same time as the metrics. With the span marker in the graph, you can see the specific spans associated with that timeframe.
- Traces
- Provides a chart showing the trace spans collected over the given timeframe. The trace spans show the most low-level detail within your workload application. The trace details further show heatmaps that provide a comparison of one span in relation to other requests and spans in the same timeframe.
- Envoy
- Shows information about the Envoy sidecar configuration.
In the web console Networking details page, the OSSMC plugin adds a Service Mesh tab similar to the Workloads details page.
In the web console Projects details page, the OSSMC plugin adds a Service Mesh tab that provides traffic graph information about that project. It is the same information shown in the Traffic Graph page but specific to that project.
4.2.2. Installing OpenShift Service Mesh Console plugin Copia collegamentoCollegamento copiato negli appunti!
You can install the OSSMC plugin with the Kiali Operator by creating a OSSMConsole
resource with the corresponding plugin settings. It is recommended to install the latest version of the Kiali Operator, even while installing a previous OSSMC plugin version, as it includes the latest z-stream release.
OSSM version | Kiali Server version | OSSMC plugin version | OCP version |
---|---|---|---|
3.0 | v2.4 | v2.4 | 4.15+ |
2.6 | v1.73 | v1.73 | 4.15-4.18 |
2.5 | v1.73 | v1.73 | 4.14-4.18 |
OSSMC plugin is only supported on OpenShift Container Platform 4.15 and above. For OpenShift Container Platform 4.14 users, only the standalone Kiali console is accessible.
You can install the OSSMC plugin by using the OpenShift Container Platform web console or the OpenShift CLI (oc
).
4.2.2.1. Installing OSSMC plugin by using the OpenShift Container Platform web console Copia collegamentoCollegamento copiato negli appunti!
You can install the OpenShift Service Mesh Console (OSSMC) plugin by using the OpenShift Container Platform web console.
Prerequisites
- You have the administrator access to the OpenShift Container Platform web console.
- You have installed the OpenShift Service Mesh (OSSM).
-
You have installed the
Istio
control plane from OSSM 3.0. - You have installed the Kiali Server 2.4.
Procedure
- Navigate to Installed Operators.
- Click Kiali Operator provided by Red Hat.
- Click Create instance on the Red Hat OpenShift Service Mesh Console tile. You can also click Create OSSMConsole button under the OpenShift Service Mesh Console tab.
Use the Create OSSMConsole form to create an instance of the
OSSMConsole
custom resource (CR). Name and Version are the required fields.NoteThe Version field must match with the
spec.version
field in your Kiali custom resource (CR). If Version value is the stringdefault
, the Kiali Operator installs OpenShift Service Mesh Console (OSSMC) with the same version as the operator. Thespec.version
field requires thev
prefix in the version number. The version number must only include the major and minor version numbers (not the patch number); for example:v1.73
.- Click Create.
Verification
- Wait until the web console notifies you that the OSSMC plugin is installed and prompts you to refresh.
- Verify that the Service Mesh category is added in the main OpenShift Container Platform web console navigation.
4.2.2.2. Installing OSSMC plugin by using the CLI Copia collegamentoCollegamento copiato negli appunti!
You can install the OpenShift Service Mesh Console (OSSMC) plugin by using the OpenShift CLI.
Prerequisites
-
You have access to the OpenShift CLI (
oc
) on the cluster as an administrator. - You have installed the OpenShift Service Mesh (OSSM).
-
You have installed the
Istio
control plane from OSSM 3.0. - You have installed the Kiali Server 2.4.
Procedure
Create a
OSSMConsole
custom resource (CR) to install the plugin by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe OpenShift Service Mesh Console (OSSMC) version must match with the Kiali Server version. If
spec.version
field value is the stringdefault
or is not specified, the Kiali Operator installs OSSMC with the same version as the operator. Thespec.version
field requires thev
prefix in the version number. The version number must only include the major and minor version numbers (not the patch number); for example:v1.73
.The plugin resources deploy in the same namespace as the
OSSMConsole
CR.Optional: If more than one Kiali Server is installed in the cluster, specify the
spec.kiali
setting in the OSSMC CR by running a command similar to the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
- Go to the OpenShift Container Platform web console.
- Verify that the Service Mesh category is added in the main OpenShift Container Platform web console navigation.
- If the OSSMC plugin is not installed yet, wait until the web console notifies you that the OSSMC plugin is installed and prompts you to refresh.
4.2.3. Uninstalling OpenShift Service Mesh Console plugin Copia collegamentoCollegamento copiato negli appunti!
You can uninstall the OSSMC plugin by using the OpenShift Container Platform web console or the OpenShift CLI (oc
).
You must uninstall the OSSMC plugin before removing the Kiali Operator. Deleting the Operator first may leave OSSMC and Kiali CRs stuck, requiring manual removal of the finalizer. Use the following command with <custom_resource_type>
as kiali
or ossmconsole
to remove the finalizer, if needed:
oc patch <custom_resource_type> <custom_resource_name> -n <custom_resource_namespace> -p '{"metadata":{"finalizers": []}}' --type=merge
$ oc patch <custom_resource_type> <custom_resource_name> -n <custom_resource_namespace> -p '{"metadata":{"finalizers": []}}' --type=merge
4.2.3.1. Uninstalling OSSMC plugin by using the web console Copia collegamentoCollegamento copiato negli appunti!
You can uninstall the OpenShift Service Mesh Console (OSSMC) plugin by using the OpenShift Container Platform web console.
Procedure
- Navigate to Installed Operators.
- Click Kiali Operator.
- Select the OpenShift Service Mesh Console tab.
- Click Delete OSSMConsole option from the entry menu.
- Confirm that you want to delete the plugin.
4.2.3.2. Uninstalling OSSMC plugin by using the CLI Copia collegamentoCollegamento copiato negli appunti!
You can uninstall the OpenShift Service Mesh Console (OSSMC) plugin by using the OpenShift CLI (oc
).
Procedure
Remove the OSSMC custom resource (CR) by running the following command:
oc delete ossmconsoles <custom_resource_name> -n <custom_resource_namespace>
$ oc delete ossmconsoles <custom_resource_name> -n <custom_resource_namespace>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify all the CRs are deleted from all namespaces by running the following command:
for r in $(oc get ossmconsoles --ignore-not-found=true --all-namespaces -o custom-columns=NS:.metadata.namespace,N:.metadata.name --no-headers | sed 's/ */:/g'); do oc delete ossmconsoles -n $(echo $r|cut -d: -f1) $(echo $r|cut -d: -f2); done
$ for r in $(oc get ossmconsoles --ignore-not-found=true --all-namespaces -o custom-columns=NS:.metadata.namespace,N:.metadata.name --no-headers | sed 's/ */:/g'); do oc delete ossmconsoles -n $(echo $r|cut -d: -f1) $(echo $r|cut -d: -f2); done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow