Part 3: Chargeback/Showback
What You Will Do¶
This is Part 3 of a multi-part, self-paced quick start exercise. In this part, you will:
- Create a Chargeback/Showback group comprising of a clusters from 1 project and a label from a different project.
- Generate and download a cost report for the chargeback group
Cost Governance¶
Navigate to Home -> System -> Cost Governance
You will see 2 sections under Chargeback Groups.
Step 1: Configuration¶
Chargeback Settings page appears. By Default, Unallocated Resources, Control Plane and Common Services cost sharing are disabled. It is important to distribute the cost of unallocated resources, Control Plane and common services among the different teams/applications utilizing the cluster
Unallocated Resources
- Enabling Unallocated Resources allows selection of the Sharing Policy
- Based on resource 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)
- Equally: 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
Control Plane
- Enabling Control Plane allows selection of the Sharing Policy
- Based on resource allocation: Allows for distribution in accordance with the ratio determined by each tenant's computed use
- Equally: Allows to equally share the shared control plane cost with all the tenants of a cluster
Common Services
Users can configure a common service policy, assigning specific costs to the shared services. The allocation of unallocated costs is then distributed proportionally based on the usage of these common services across namespaces.
- Enabling Common Services allows to Add Policy and select Share Policy. Common Services can be configured using the policies
For this exercise, select the Sharing Policy "Equally" and click Save
Step 2: Create Group¶
Groups section lists all the chargeback groups created. Each line item shows the name of the group, brief summary and actions.
- Click on "Create Chargeback Group"
- Give an appropriate name (say, demo-chargeback-group) and select a project from the list below
- Select a combination of Cluster, Namespace, Workload Labels
- Select Include, multiple such combinations can be selected and added to a chargeback groups
- Click Save
Step 3: Generate and Download Report¶
- Click on the ellipses at the end of the list item and select "Reports"
- Select a start date and end date in the "Generate Chargeback Report" section and click on Generate
The report generation starts and you will see "In Progress" status in the below section. Once the status turns to "Completed" click on the download report button.
The report contains cost data at a pod level aggregated per day in for the duration selected.
Recap¶
Congratulations! You have successfully created a chargeback group and generated a cost report.