Calculate effective usage with cost models
Use cost management to calculate the effective usage of cloud infrastructure, to more accurately correlate cloud costs with a pod or namespace by considering their direct use. Note that cloud providers charge for the infrastructure costs of running a cluster, regardless of your overall usage.
Before you begin
- You must be a user with Cost Administrator or Cost Price List Administrator permissions. For information about configuring user roles, see Limit access to cost management resources.
- You must add your OpenShift cluster as a cost management data integration. For more details, see ../integrate/integrate-rhocp-data-with-cost-management.ditamap#integrate-rhocp-data-with-cost-management in Getting started with cost management.
A pod typically requests resources, such as CPU or memory, from a cluster. The cluster then reserves these requested resources as a minimum, but the pod might use more or less than it initially requested. The effective usage metric in cost management uses whichever kind of usage, CPU or memory, is greater per hour.
You can create a cost model in cost management to estimate your effective usage. Ultimately, you can use this data to understand how infrastructure cost is distributed to your OpenShift project.
Procedure
- Log in to Red Hat Hybrid Cloud Console.
- From the Services menu, click .
- In the Global Navigation, click .
- In the Cost Models tab, click Create cost model to open the cost model wizard.
- Enter a name and description for the cost model and select OpenShift Container Platform as the integration type. Click Next.
-
Create a price list so that you can assign rates to usage or requests. The cost management service collects these metrics from OpenShift but there is no cost attached to them in cost management until you apply a cost model.
- Click Next.
- (Optional) On the Cost calculations page, apply a markup or discount to change how raw costs are calculated for your integrations. Adding a markup to your raw costs can allow you to account for your overhead costs, such as the cost of administering your AWS account, Azure subscription, or other support costs. A markup is an estimation to cover your costs not shown by metrics or usage.
- On the Cost distribution page, select the CPU or Memory distribution type. The distribution type distributes costs based on CPU or memory metrics in project cost breakdowns. If your cluster has high memory usage, select Memory. If your cluster has high CPU usage, select CPU. Click Next.
- Assign an integration to your cost model and then click Next.
- Review the details and then click Create.
- To review the results of your cost model on a integration, in the Global Navigation, click .
- Select a project and view the results.