As the use of containerized applications keeps growing, so does the need to control costs. For small startups and the Fortune 500, it is difficult to monitor the costs of Kubernetes infrastructure. And it is even more challenging to know which parts of the organization are driving cloud infrastructure costs higher.
One solution is to install an automated cost management system to cut down on the time and effort of manual per-container calculations, as well as to reduce the chance of errors.
Launched in 2019, Kubecost has become well known in the industry with booths at KubeCon and as a member of CNCF. And in 2021, Kubecost announced a $5.5 million seed round from First Round Capital and others.
In this article, we will take a closer look at Kubecost, a cost optimization tool, for Kubernetes cost monitoring.
Calculating costs manually
“By 2022, over 90% of enterprises worldwide will be relying on a mix of on-premises/dedicated private clouds, multiple public clouds, and legacy platforms to meet their infrastructure needs.”–IDC
It is possible to monitor costs by calculating the cost of each container, manually. However, this becomes more difficult when your containers and applications are located across many cloud platforms like GKE, EKS, AKE, and on-premise, as IDC highlights is often the case.
Additionally, calculating the cost per container is time-consuming and may require additional infrastructure. As projects use different containers and clouds, it becomes difficult to track all the resources a container is using from a server, which further reduces cost transparency. This is where Kubecost aims to simplify things and improve the workflow.
How Kubecost works
Kubecost collects real-time data from your Kubernetes cluster and analyzes it, giving you a detailed cost breakdown. Kubecost, which is specifically designed to work with Kubernetes, uses these metrics and cost categories:
Metrics Used | Cost Categories |
---|---|
Time in running state | Monthly cluster cost |
Consumed and reserved resources | Deployment resource cost |
Price of resources consumed or reserved | Cost efficiency |
Kubecost offers a paid and a freemium version. The freemium version limits metric storage up to fifteen days with a single cluster. The Business plan starts at $449 per month up to 100 nodes, and then is $799 per month up to 200 nodes. With the Business plan, Kubecost offers 30-day metric storage, multi-cluster, and access to support. For enterprises with more than 200 nodes, you can choose an Enterprise plan which offers unlimited metric storage and dedicated support.
When installed, Kubecost comes with a 32 GB persistent volume, which is enough to retain 300 pods. You can integrate Kubecost with these cloud infrastructures:
How Kubecost helps control costs
The Kubecost cost allocation model can analyze costs on any Kubernetes level, supporting native Kubernetes concepts including clusters, namespace, controller, deployment, service, label, pod, and container. Kubecost uses the data to tell you how to optimally tune nodes and pods. It finds underutilized nodes and storage, so that you can more effectively use or eliminate them.
One of their newer feature helps you find an optimal set of nodes for a Kubernetes cluster, giving you recommendations on cluster configurations. This can help users achieve savings of twenty-five to sixty percent. Kubecost measures idle memory as a percentage of your overall cluster spend. You can use that data to determine where to more efficiently use resources.
And in December 2021, Kubecost announced a new feature called Spot Commander to help organizations reduce costs with spot instances. The feature automatically tags workloads as either spot-ready or non-spot-ready depending on the requirements. For spot-ready workloads, organizations may be able to save as much as 90% by taking advantage of excess capacity discounts offered by the cloud providers.
Kubecost's notifications feature set will alert you when your cost threshold has been met, so that you can take action to stop further costs. Kubecost also allows you to set recurring updates on scheduled cost reports allocated by namespace and set thresholds based on your financial goals.
With the premium version, you can allocate costs to apps and teams by adding role access to the cloud provider billing data. That transparency helps you avoid resource bottlenecks.
Benefits of Kubecost
Adding Kubecost to your Kubernetes tools can help you keep your costs down and improve your company’s productivity. In addition to the above features, here are some of the benefits it offers:
- Real-time cost allocation and cost allocation configurable by labels, so that you can measure the cost of every product and team
- Dynamic asset pricing when you integrate Kubecost with AWS and Google Cloud Platform
- Cost allocation metrics for CPU, GPU, memory, and storage
- Alerting functionality and recurring reports
- Enterprise support and a lengthy metric retention period
Finally, its detailed cost analyses help you adjust your operations to ensure you’re not wasting money or resources.
Kubecost vs. alternatives
There are other tools that offer similar services, such as CAST AI. In addition, Kubecost lacks the auto scaling mechanisms that competitors offer, such as for horizontal pods or nodes. Kubecost’s focus is on cost optimization tools.
However, it offers features that other tools don’t, such as:
- connecting in-cluster with out-of-cluster costs
- connecting dedicated cloud provider services with components
- providing distribution of shared in-cluster and out-of-cluster costs across the organization
Kubecost also offers a good level of security, as it defaults to read-only Kubernetes privileges and doesn’t ship any data out of your cloud infrastructure.
Final thoughts
As your cloud infrastructure and Kubernetes-related expenses grow, you need to find effective ways of managing costs and improving workflows. Kubecost can help you achieve these goals with an out-of-the-box cost-monitoring solution. Kubecost is likely a better solution for larger enterprises where cost allocation across multiple business units is important. For a small startup, Kubecost is probably less helpful.
If you're looking for a third-party, maintenance-free platform that makes it easy to monitor your Kubernetes clusters and view costs in real-time, then Airplane is a good fit for you. Airplane is the developer platform for building internal tools. With Airplane, you can transform scripts, queries, APIs, and more into powerful workflows and UIs. With Airplane Views, you can quickly build a React-based dashboard that makes it easy to build a metrics dashboard.
Sign up for a free account or book a demo and build powerful custom UIs to help track your Kubernetes applications quickly.