[Tech Blog] Saving Cost on Kubernetes with CloudNatix
Blog|Date : 2024-04-11

Overview🍃

 

 

Kubernetes, as of late, has been dubbed as the “OS of the Cloud”. This is no surprise, as Kubernetes solidifies its position as a mainstream technology, with 66% of companies are using Kubernetes in production, with the other 18% evaluating it. For all its benefits, Kubernetes does not completely solve all the issues present in traditional architectures, with the foremost amongst these being cost optimisation.

 

 

According to a recent CNCF microsurvey, Kubernetes cost monitoring approaches are still relatively immature, with just 19% of respondents having access to accurate cost information, 40% estimating their Kubernetes costs, and 38% having no monitoring in place at all. However, it is important not to let costs go unchecked, especially as Kubernetes can easily eat into cloud budgets. In fact, according to the same microsurvey, around 46% of companies surveyed found that their cloud spending increased after they adopted Kubernetes. To understand this, we can break down Kubernetes costs into three major cost components:

 

 

  1. Infrastructure costs: These include compute resources, storage, and networking costs charged by cloud providers.
  2. Operational costs: Managing and monitoring Kubernetes clusters, configuring continuous integration and delivery (CI/CD) pipelines, and maintaining the overall infrastructure can incur significant operational costs.
  3. Hidden costs: Overprovisioned resources, underutilised clusters, and inefficient resource allocation can lead to hidden costs that often go unnoticed.

 

 

These costs can be the root cause of increasing cloud spending. While there are many best practices, such as cluster right-sizing, adjusting the limit and the rates of workload, and more, there is not much you can do without understanding the nitty-gritty details of your Kubernetes usage. You can’t understand what you don’t see, and you can’t optimise what you don’t understand. Another thing to note is that Kubernetes doesn’t have a native implementation of Kubernetes cost optimisation, monitoring and reporting. This is why implementing a cost monitoring and reporting tool is crucial.

 

 

This is where cost optimisation tools like CloudNatix come into the picture. Even though we found there are many other cost optimisation tools, we found that CloudNatix has an advantage with their machine-learning supported feature. In this article, we will discuss in more detail how CloudNatix can help reduce Kubernetes costs and achieve best practices in cost optimisation, delivering an impressive ROI of up to 4x.

1. Observe the cost of infrastructure and usage insights through the CloudNatix dashboard

 

 

By default, CloudNatix provides a fully-fledged global dashboard to have a unified view of multi-cloud infrastructure for cloud-native applications on Kubernetes. This dashboard helps the customer to understand the overview of their cloud usage, the average overall spending on the cluster and possible savings recommendations. This feature empowers customers to delve into comprehensive resource details, encompassing their usage across namespaces and associated costs on various clusters. Through this dashboard, it is much easier to do budget forecasting of operations over multiple clusters.

 

 

2. Understand the possible savings through the recommendation engine

 

 

CloudNatix provides real-time visibility into resource utilisation and cost metrics, enabling continuous monitoring and optimisation. With its advanced analytics and recommendation engine, it identifies opportunities for cost savings and helps right-size resources based on actual usage patterns. It can provide recommendations for compute instances as well, such as spot instance recommendation and best-fitting compute instance and type for the workloads exist in the cluster (for example EC2 instance with instance type of t4g.medium to r6g.medium in AWS)

 

 

Instance type recommendation based on the usage

 

 

Workload cost-saving recommendation based on the usage

 

3. Act to optimise the cluster through the operations manager

 

 

As the customer begins to understand the possible savings, it is easier for the customer to take actions directly from the CloudNatix dashboard. Actions such as vertical rightsizing, reviewing top-ten most resource-intensive K8s workloads and identifying other saving opportunities. With this operation manager, it is easier to get an overview of all the actions that can be done to enhance the infrastructure to be more efficient. This has also proven to be useful to handle the fine-grained details of each workload.

 

 

4. Automate the right-sizing through Autopilot

 

 

To extend the capabilities of CloudNatix, they have used their expertise to build upon a concept called Autopilot, which was first introduced by Google and utilised as workload autoscaling. When combined with the above three capabilities, it exemplifies the standout offering from CloudNatix. Its primary goal is to reduce resource usage while making sure that the workload won’t be killed with an out-of-memory error or performance degradation because of CPU throttling. It utilises machine learning algorithms to achieve this.

 

 

With CloudNatix, it is possible to perform impact analysis on cost-saving and ensure the environment is cost-optimised while meeting SLOs. Crucially, this is all done with the helpful context provided by CloudNatix shown above.

 

 

Conclusion🍃

 

 

With greater adoption of Kubernetes cluster for the workload, it can be difficult to manage the cost of the infrastructure. Through these 4 steps in reaching a cost-optimised environment, CloudNatix can help you to achieve a fully-monitored Kubernetes environment, recommendation-optimised workload and compute instance, and automated vertical rightsizing on workloads. With all that in mind, handling Kubernetes will be more cost-friendly, and you can allocate that extra cost to the things that are more important for your workloads and operation.

#Kubernetes #CloudNatix #MegazoneCloud #Megazone #MZC

Written by Theodore Fabian Rudy, Associate Solutions Architect, MegazoneCloud Hong Kong