Author: Shivang Goswami(shivang.goswami1@ibm.com), Bhavneet Kaur (Bhavneet.Kaur2@ibm.com), Rishika Kedia(rishika.kedia@in.ibm.com)
Why is cost management needed:
Any resource consumed over the cloud infrastructure has an associated cost to it. The mechanism to achieve the same thing for on-premises infrastructure machines like IBM Z® and IBM® LinuxONE was absent previously. This is where Red Hat® OpenShift® Cost Management Operator becomes essential.
What is Cost Management Operator?
The Red Hat OpenShift Cost Management Operator is a software-as-a-service (SaaS) offering included with your Red Hat OpenShift subscription at no additional cost.
This service gives you visibility into your costs—down to the project level—across all Red Hat OpenShift instances deployed on IBM Z and IBM® LinuxONE and it supports both KVM and IBM z/VM® based clusters.
What are the benefits of the Cost Management Operator?
Cost management allows you to:
- Visualize and aggregate costs across IBM Z and IBM® LinuxONE infrastructures to track cost trends and generate show back reports.
- Use tag labels to map costs to clusters, projects, cost centres, applications, or any other tagged entities— providing clear insights into spending aligned with business priorities.
- Build organization-defined cost models that can include markups, CPU, memory, and storage costs, to normalize data and provide a better representation of the actual costs associated with Red Hat OpenShift.
Where is Cost Management Operator available?
Cost Management Operator is available on Red Hat OpenShift OperatorHub.
For the latest version, visit:
https://catalog.redhat.com/software/containers/costmanagement/costmanagement-metrics-rhel9-operator/67168aeaef33c5ffaff8cd45?architecture=s390x
Installation and setup in a Red Hat OpenShift cluster
Prerequisites:
- A Red Hat OpenShift cluster installed on IBM Z or IBM® LinuxONE (s390x architecture, KVM and z/VM-based clusters are supported)
- One or more Storage class are already configured in the cluster.
- For clusters having internet connectivity to Red Hat management console, make sure that the cluster is already on-boarded to the console.
A KVM-based cluster running Red Hat OpenShift version 4.13.34 is used as an example.

The ‘Cluster ID’ shown in the picture above is visible on Red Hat Management console as well.

Note: This step is important if you want the Cost Management Operator to integrate automatically with the Red Hat Cloud Console using values provided in the Custom Resource Definitions (CRDs).
Step 1: Installing the operator.
- Login into OpenShift console
- Go to Operators -> OperatorHub, this screen appears

- Search for Cost Management: Upon performing the search, two tabs appear in the results: Cost Management Operator (Red Hat Certified) and Koku Metrics Operator (Community Version)

-
Select required options and install the operator

- After the installation, the operator should be visible under the "Installed Operators" tab in the Operators section.

- Select the operator, this will open the details. Click on “CostManagementMetricsConfig” tab and click create

- A form will appear. We will use the default settings and make only two necessary changes

- Go to the source tab, check the “create_source” checkbox to create an entry in the Red Hat Cloud Console, and provide a name for the source. Then, click "Create."

-
Assuming that storage class is configured, all resources in namespace “costmanagement-metrics-operator” (default) should be up and running.
From the Cloud Console, go to OpenShift -> Cost Management -> OpenShift

As is evident from the image, the cost management service has detected integration but requires some time to process the results.
Step 2: Creating cost model
- Go to console.redhat.com and login with your credentials.
- Go to OpenShift -> Cost Management -> settings tab and click on “Create Cost Model”

-
Enter the name and description along with currency of your choice. Integration will be Red Hat OpenShift in case of s390x based cluster.

- Create a price list on the second tab. Use “Create Rate” button to define a price for a resource.
In this example, the CPU rate is defined as €3 per core-hour based on usage.
The above metrics are available on the software as of now.
- The third tab allows us to create Markup/Discount (optional)

- The fourth tab has options on how to distribute the costs

-
The fifth tab allows you to select a source for integration. Here, we are selecting the newly created source.

-
The last tab is for reviewing the details.

-
Click on “Create Cost Model” and cost model will be visible on the UI.

Step 3: Explore the cost overview and cost explorer
Go to OpenShift -> Cost Management to see the various tabs
- “Overview” tab

-
- All Red Hat OpenShift cost: This graph depicts the cluster cost per day on cumulative and daily basis.
- Top Projects: Displays the project wise resource consumption.
- Top Clusters: Displays the cluster wise resource consumption.
- CPU Usage and requests: Displays per day CPU consumption data.
- Memory usage and requests: Displays the daily memory consumption data.
- Volume usage and requests: Displays daily storage consumption data.
- “OpenShift Details” tab
This section allows us to view costs by grouping attributes like projects, node and cluster. There is also an option to include/exclude overhead costs.
-
“Cost Explorer” tab

This tab allows us to explore costs based on the filters available in Red Hat OpenShift details, along with custom date ranges.
- "Settings" tab

This tab contains settings that define the cost calculation, including the cost models.
Conclusion
By following the steps outlined in this article, we successfully installed the Cost Management Operator, deployed the necessary custom resources, and configured essential settings to define models for cost-based analytics. The solution offers a comprehensive overview of costs across various dimensions, complete with graphical representations of expenditure. While the article focuses on the IBM Z / IBM® LinuxONE environment, the Cost Management Operator is versatile and can be applied to other architectures, including public and hybrid cloud environments. This makes the Red Hat Cloud Console a central platform for monitoring and managing costs across multiple Red Hat OpenShift instances.