Kubecost Cost Allocations in Kubernetes

kubecost
Reading Time: 3 minutes

KubeCost – Introduction

Kubecost helps you & your FinOps team to monitor and manage the cost and also capacity in Kubernetes environments. It helps you integrate various tools with your infrastructure to help your team track, manage, and reduce the overall cost. You can monitor & have insights on your Kubernetes spends at a very granular level additionally you can have insights on other cloud resources out of the cluster.

Cost Allocations

It will show combined bars for pods’ costs like how much amount of cost you are spending grouped by pods over a period of time. Cost Allocation is one of the main features of Kubecost. It can show you cost breakdown at a very granular level. You can also select a time range as shown in the Diagram and use aggregators to group your result.

Features

  • Cost Allocations Aggregations: You can also see your cost allocation results and group the results by pods, namespaces, containers, deployments, nodes, controllers, and teams.
  • Date ranges: You can select any date range along with aggregators to see your spending in the past.
  • Customize Reports: You can customize these reports & filter out costs that you wat to exclude for example you might want to exclude kube-system namespace.
  • Alerts: Setup Alerts on these cost allocations & receive all those alerts on your email & slack channels.
  • Reports in CSV format: You can export your spending into a.csv file. You can also edit & filter your report in Kubecost with some labels & namespaces then export it as a .csv file.

In the above image you can see with the Kubecost cost allocation feature we can now see our spending on each Kubernetes pod running in our cluster. Now, the FinOps team can operate & manages these costs & apply some practices to reduce & optimize the Kubernetes spending.

It shows the cost of CPU usage, GPU, RAM, PV, Network, LB, and Shared costs and also tells the efficiency of usage. Efficiency can be defined as (usage/request) for CPU and RAM.

Cost Allocations – Aggregations

You can also see your cost allocation results and group the results by pods, namespaces, containers, deployments, nodes, controllers, and teams. Even you can also aggregate results on any custom labels if you have configured them with your workloads.

As shown in the above image the cost allocations are grouped by namespace so can see each & every namespace’s cost & spending. It will aggregate all spending for each namespace on CPU usage, GPU, RAM, PV, Network, LB, and Shared costs.

Date Ranges & Custom Ranges

You can select any date range along with aggregators to see your spending in the past. Additionally, you can also add custom time ranges if you want to see spending on some specific period of time or if your FinOps team wants to generate reports over a specific time period.

As shown in the above image, You have dozen of predefined options for time ranges or can say date ranges. Also, there is a block where you can specify a custom range & it will show the cost of spending on that range.

Cost Allocations Reports

Now, the FinOps team can operate & manages these costs & apply some practices to reduce & optimize the Kubernetes spending. And one great feature of Kubecost Cost allocations is you can export your spending into a.csv file. You can also edit & filter your report in Kubecost with some labels & namespaces then export it as a .csv file. As shown below image this is an example of exported CSV file in an excel sheet. This way FinOps team can then apply some formula & keep a record of your report at both places Kubecost & in excels sheets.

Conclusion

Kubecost provides granular visibility on your Kubernetes cost & cloud spending. It is worth incorporating into FinOps practices. It will help your organization to get started with FinOps practices. For more details, you can check Kubecost’s Official Website.

Written by 

Rahul Soni is a Software Consultant at Knoldus Software. He is always charged up for new things & learnings. He is dedicated to his work and believes in quality output. He loves to take deep dives into cloud technologies & different tools.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading