Cost Governance allows creation of chargeback groups to track and bill internal teams based on resource consumption. Chargeback/Showback groups can be any logical grouping of resources and these groups can be created based on project, clusters, namespaces and/or labels. The Chargeback help the users to understand which resources are being consumed and the costs associated with these resources.
An admin can create Chargeback Groups via multiple methods:
- RCTL CLI
Getting to the Chargeback Group¶
- Login to the controller
- Click on System and select Cost Governance
Chargeback Group page appears.
- Click Configuration to enable/disable the Share unallocated cost
Enabling it allows you to select the sharing type
Share based on Allocation: Allows for distribution in accordance with the ratio determined by each tenant's computed use. For example, if a cluster has 2 namespaces with 30% and 40% allocated, the unallocated cost gets divided in the same ratio (30:40).
- Share based on tenancy: Allows to equally share the shared cost with all the tenants of a cluster. For example, if a cluster has 2 pods, the remaining 30% of unallocated cost gets divided equally.
- Click Save
Note: Sharing the unallocated cost is optional
A chargeback group is a collection of resources forming a logical entity in a customer's organization. These would typically be based on namespaces and/or specific ‘labels’.
Users have the flexibility in the platform to create chargeback groups based on a variety of parameters. Org Admin can create chargeback groups.
Create Chargeback Group¶
Perform the below steps to create a chargeback group
- Click Create Chargeback Group under Groups. A new Chargeback page appears
- Provide a name for the group
Select the Report Type, either Summary or Detailed
Selecting Summary type allows the users to retrieve an aggregated cost based on Project, Cluster, Namespace, Label, and Namespace Label. Based on the selection, add details of the resource. Below is an example of Aggregate based on Project with Resources Selection as All Projects. This will generate a cost summary report of all projects
- Selecting Detailed type allows the users to choose a project and the available clusters/namespaces/labels or a combination/exclusion of all to form a chargeback group
- Select the required cluster, namespace, and labels available within the selected project, and click Include. You can do as many as inclusions based on the requirement
Use Exclude button to remove a specific cluster, namespace, label or any combination from this group
On successful creation, you can view the newly created group in the Groups page as shown below
Generate Cost Reports¶
Once a chargeback group is created, users can generate cost reports at their convenience.
- Under the Groups, click the ellipsis icon of a specific chargeback group and select Reports
- Select a period (Start and End date) and click Generate
The report generation process is compute intensive and it may take a few minutes to generate the report. Once the report is ready, click the download button to download the report in CSV format