Rightsizing exercises with Cost Explorer¶
As organizations increase their K8s footprint and onboard more applications, it becomes extremely critical to have an unified (cross account, cross cloud) view of resource utilization metrics across clusters. Without this, organizations will be running blind to their K8s cost structure and it will be impossible to operate their infrastructure in a cost effective manner.
A recent release introduced a new integrated capability within the platform referred to as "Cost Explorer". This capability provides organizations with necessary information to effectively undertake "cluster rightsizing" and "application rightsizing" exercises.
Guide for success¶
Step 1: Identify clusters and namespaces that need to be resized
It is important as a first step to be able to easily identify clusters and namespaces that have low efficiency scores. Efficiency can cut across two dimensions:
-
Utilization: This is measured in terms of the % of available resources that has been allocated i.e. (Allocated/Total). If a cluster has a significant amount of unallocated resources, it will translate to a low efficiency score for the cluster
-
Resource Requests: This is measured in terms of the % of allocated resources that are being utilized i.e. (Utilized/Allocated). If an application requests for significantly more resources that what it utilizes, it will translate to a low efficiency score for the application
Step 2: Cluster/Namespace utilization metrics
For clusters/namespaces that have been identified as inefficient, it is important to get a better understanding of the metrics driving the low scores. Examples include:
- Is it a specific node in the cluster that's inefficient?
- Is low CPU or low memory utilization that's driving the low scores?
Step 3: Node/Application utilization metrics
In some cases, it may also be necessary to analyze utilization metrics at a node/application level to understand the kind of optimizations that will need to be implemented.
Step 4: Rightsizing
Once inefficiencies have been identified, the next step would be to drive the optimizations exercises. This is a recurring exercise and needs to be implemented with caution taking a number of factors into account. There is "no size fits all" and optimization strategy depends on the type of environment, application etc. As an example. for a node that is underutilized, the optimizations options can potentially be a combination of the following:
- Resize the node
- Reduce number of Nodes
- Implement Cluster Autoscaling
Implementing rightsizing with Rafay¶
Rafay's integrated cost explorer solution calculates efficiency scores for clusters and namespaces out of the box, and makes it extremely simple to identify inefficient resources. There is an option to export efficiency scores as a csv report as well.
It is possible to visualize metrics by various dimensions including utilization, projects, nodes, namespaces, applications, providers and labels.
It is also possible to visualize granular metrics by nodes and applications/pods.
These granular metrics by different dimensions can be leveraged by the platform and application teams to carry out "cluster rightsizing" and "application rightsizing" exercises in a consistent manner.
Next Steps¶
If you are interested in learning more about Rafay's "Kubernetes Management" or "Cost Management" offerings,
-
Sign up for a Free Trial
-
Schedule a demo of Rafay Cost Management
-
Reach out if you would us to create and post videos of specific use cases or scenarios related to Cost Management.
-
Meet us at upcoming events, AWS re:Invent, Gartner IOCS and several other regional events.
Sincere thanks to readers of our blog who spend time reading our product blogs. Please Contact the Rafay Product Team if you would like us to write about other topics.