Installing and integrating Red Hat OpenShift Container Platform data into cost management
In this resource, we’ll begin the process of using cost management for Red Hat® OpenShift® by installing the OpenShift Cost Management Metrics Operator and integrating Red Hat OpenShift Container Platform (OCP) data into the tool.
What will you learn?
- Installing and configuring the Cost Management Metrics Operator
What do you need before starting?
Installing and integrating OCP data into cost management
In this resource, we’ll begin the process of using cost management for Red Hat OpenShift by installing the OpenShift Cost Management Metrics Operator and integrating Red Hat OpenShift Container Platform (OCP) data into the tool.
Confirm that your Azure Red Hat OpenShift cluster is ready from the Azure Portal.
In the Azure Portal, your cluster should show that it's ready and available. Log in to the OpenShift Console.
Log in to the OpenShift Console with your Red Hat credentials. Click Administrator > Operators > OperatorHub and search for “Cost Management Metrics Operator.”
Search OperatorHub for the Cost Management Metrics operator. Click the Cost Management Metrics Operator and click Install.
Install the Cost Management Metrics Operator from the OperatorHub. Under Installation mode, select “A specific namespace on the cluster.” Use the Operator-recommended namespace, costmanagement-metrics-operator, in the next section.
Define the namespace in the Cost Management Metrics Operator installation wizard. - Get your username and password for https://console.redhat.com/. We are going to create a secret and provide this information to the cost management operator.
Click Workloads > Secrets > Project: costmanagement-metrics-operator > Create Key/value secret.
Create the key/value secret from the Secrets manager for your project. - Fill in the following information:
- Secret name: basic-auth-secret
- Key/Value username: XXX (choose your own)
password: XXX (choose your own)
Define the secret name, key/value username, and password in the Key/Value Secret wizard. Your defined password and username will then be visible. You will now see your secret in the Secrets manager. Click Administrator > Operators > Installed Operators and check the Cost Management Metrics Operator.
The installed Cost Management Metrics Operator will now show under Installed Operators.
Create the CostManagementMetricsConfig instance.
Create the CostManagementMetricsConfig instance in YAML view. - Update the following parameters:
source: create_source: false name: ‘’
source: create_source: true name: ‘cost-aro’ ##name should be unique
spec: authentication: type: token
spec: authentication: secret_name: basic-auth-secret type: basic
You are now ready to integrate Microsoft Azure data into the cost management service.