Red Hat Advanced Cluster Management for Kubernetes (RHACM) observability service provides many ways to help you gain insight about your managed clusters, and optimize your managed clusters. This information can save costs and prevent unnecessary events. By default, observability service is included with the product installation, but not enabled. Due to the requirement for persistent storage, the observability service is not enabled by default. In this blog, I introduce you to how to use Red Hat OpenShift Data Foundation as stable object stores to store your metric data.
Red Hat OpenShift Data Foundation is software-defined storage for containers. Engineered as the data and storage services platform for Red Hat OpenShift, Red Hat OpenShift Data Foundation helps teams develop and deploy applications quickly and efficiently across clouds.
In this blog, I provide the steps for you to complete these high-level steps to configure your RHACM observabilty service with Red Hat OpenShift Data Foundation:
- Deploy Red Hat OpenShift OpenShift Data Foundation.
- Enable Red Hat Advanced Cluster Management observabilty service with Red Hat OpenShift Data Foundation.
Prerequisites
You need the following things configured in your environment:
- Configure
oc(ver. 4.3+) andkubectl(ver. 1.16+) to connect to your Red Hat OpenShift Container Platform (Note: this name has changed to OpenShift Data Foundation in version 4) cluster - Install RHACM
- Install
jq
Deploy Red Hat OpenShift Data Foundation
Follow this blog, Deploying your storage backend using OpenShift Container Storage 4 to deploy Red Hat OpenShift Data Foundation.
Enable Red Hat Advanced Cluster Management Observabilty Service with Red Hat OpenShift Data Foundation
After the OpenShift Data Foundation is installed, complete the following steps to enable the RHACM observabilty service with Red Hat OpenShift Data Foundation:
-
Log in to your RHACM hub cluster.
-
Create a namespace for the observability service with the following command:
oc create namespace open-cluster-management-observability -
Generate your pull-secret. If RHACM is installed in the
open-cluster-managementnamespace, run the following command:DOCKER_CONFIG_JSON=`oc extract secret/multiclusterhub-operator-pull-secret -n open-cluster-management --to=-`If the
multiclusterhub-operator-pull-secretis not defined in the namespace, copy thepull-secretfrom theopenshift-confignamespace into theopen-cluster-management-observabilitynamespace. Run the following command:DOCKER_CONFIG_JSON=`oc extract secret/pull-secret -n openshift-config --to=-`Then, create the pull-secret in the
open-cluster-management-observabilitynamespace, run the following command:oc create secret generic multiclusterhub-operator-pull-secret \
-n open-cluster-management-observability \
--from-literal=.dockerconfigjson="$DOCKER_CONFIG_JSON" \
--type=kubernetes.io/dockerconfigjson -
Access the object storage configuration from your OpenShift Data Foundation service, and then create the secret for your object storage:
-
Run the following command to get access key:
$ ACCESS_KEY=$(oc get secret noobaa-admin -n openshift-storage -o json | jq -r '.data.AWS_ACCESS_KEY_ID|@base64d')
$ echo $ACCESS_KEY
YOUR_ACCESS_KEY_VALUE -
Run the following command to get secret access key:
$ SECRET_KEY=$(oc get secret noobaa-admin -n openshift-storage -o json | jq -r '.data.AWS_SECRET_ACCESS_KEY|@base64d')
$ echo $SECRET_KEY
YOUR_SECRET_KEY_VALUE -
Run the following command to get endpoint:
oc get noobaa -n openshift-storage -o yaml
...
serviceS3:
externalDNS:
- YOUR_END_POINT_URL_VALUE
- YOUR_END_POINT_URL_VALUE
...Your secret might resemble the following file:
apiVersion: v1
kind: Secret
metadata:
name: thanos-object-storage
namespace: open-cluster-management-observability
type: Opaque
stringData:
thanos.yaml: |
type: s3
config:
bucket: first.bucket
endpoint: YOUR_END_POINT_URL_VALUE
insecure: true
access_key: YOUR_ACCESS_KEY_VALUE
secret_key: YOUR_SECRET_KEY_VALUE -
Run the following command to create the secret for your object storage:
oc apply -f thanos-object-storage.yaml -n open-cluster-management-observability
-
-
Create the
MultiClusterObservabilitycustom resource to enable the observability service. Your custom resource might resemble the following file:apiVersion: observability.open-cluster-management.io/v1beta2
kind: MultiClusterObservability
metadata:
name: observability
annotations:
spec:
observabilityAddonSpec:
enableMetrics: true
interval: 30
storageConfig:
metricObjectStorage:
key: thanos.yaml
name: thanos-object-storage-
Run the following command to create your custom resource:
oc apply -f multiclusterobservability_cr.yaml -
Check the custom resource status. If you receive the following message, the observability service is enabled successfully:
Observability components are deployed and running. Run the following command to view thestatus:oc get mco observability -o yaml
...
status:
conditions:
- lastTransitionTime: "2021-06-10T07:57:23Z"
message: Installation is in progress
reason: Installing
status: "True"
type: Installing
- lastTransitionTime: "2021-06-10T07:59:24Z"
message: Observability components are deployed and running
reason: Ready
status: "True"
type: Ready
-
Conclusion
Throughout the blog, I introduce a storage solution for Red Hat Advanced Cluster Management observabilty service. In addition, you can also use Amazon S3 (or other S3 compatible object stores like Ceph), Google Cloud Storage, or Azure storage as the storage service. For more details on Red Hat Advanced Cluster Management observabilty service, see the product documentation.
I hope that this article was useful to you. Please don’t hesitate to reach out if you have any feedback!
À propos de l'auteur
Plus de résultats similaires
Key considerations for 2026 planning: Insights from IDC
Enhance workload security with confidential containers on Azure Red Hat OpenShift
Edge computing covered and diced | Technically Speaking
Parcourir par canal
Automatisation
Les dernières nouveautés en matière d'automatisation informatique pour les technologies, les équipes et les environnements
Intelligence artificielle
Actualité sur les plateformes qui permettent aux clients d'exécuter des charges de travail d'IA sur tout type d'environnement
Cloud hybride ouvert
Découvrez comment créer un avenir flexible grâce au cloud hybride
Sécurité
Les dernières actualités sur la façon dont nous réduisons les risques dans tous les environnements et technologies
Edge computing
Actualité sur les plateformes qui simplifient les opérations en périphérie
Infrastructure
Les dernières nouveautés sur la plateforme Linux d'entreprise leader au monde
Applications
À l’intérieur de nos solutions aux défis d’application les plus difficiles
Virtualisation
L'avenir de la virtualisation d'entreprise pour vos charges de travail sur site ou sur le cloud