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!
저자 소개
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
가상화
온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래