How to Unite AWS Reserved Instances with Karpenter to Ensure Optimal Savings - Zesty

How to Unite AWS Reserved Instances with Karpenter to Ensure Optimal Savings

By Maxim Melamedov
CEO and Co-founder

Both Karpenter and AWS Reserved Instances (RIs) were built to reduce the overall On-Demand costs of cloud resources. However, when they are not synchronized properly, Karpenter can potentially undo the savings benefits of Reserved Instances.

Reserved Instances are discounted pre-paid cloud computing capacity offered by AWS which are used to bring down the cost and provide pricing stability for On-Demand instances – the premium pricing model. Karpenter is a Kubernetes cluster auto-scaler that automatically launches just the right compute resources (e.g CPU, memory) to handle a cluster’s applications.

Unfortunately, using Karpenter to rightsize workload resources when they’ve been allocated for Reserved Instances can reduce the steady-state workloads that are already benefiting from discounts. Since Karpenter’s default configuration chooses diversified EC2 instances, this can result in significant over-provisioning, as well as a potential spike in On-Demand costs.

This article describes how to use Reserved Instances and Karpenter in harmony and optimize your savings and resources at the same time.

Using RIs and Karpenter in the Wild

To understand the ramifications of using Karpenter on top of Reserved Instances without taking necessary precautions, let’s dive into an actual use case.

A company in the SaaS industry implemented EKS and Karpenter in its default configurations. By default, Karpenter is being trained for one week to find the most efficient workload types and configurations for the customer’s particular environment and rightsizes the nodes accordingly. This consolidation process can potentially reduce the number of nodes in the environment.

This meant that when the customer moved container workloads into Karpenter, the total number of nodes dropped, leading to significant over-provisioning of existing RIs and a spike in On-Demand costs.

In order to reverse the spike in On-Demand and achieve the best utilization of RIs, the SaaS company needed to consider the following:

By answering these questions, the company could configure Karpenter to better align with RI allocations and maximize discounts.

Unpacking the Impact of Karpenter’s Technology

As we saw in this example, while Karpenter reduces infrastructure costs by rightsizing nodes, it has the potential to backfire financially when used with steady-state workloads that have already been allocated to RIs.

This can result in the following short-term implications:

By strategically allocating workloads to Karpenter and optimizing the use of Reserved Instances, the customer could enhance their ability to leverage discounts from both technologies, resulting in maximum cost savings.

Reconfiguring Karpenter for Improved Workload Stability

Reconfiguring Karpenter to change the instance family type is another way organizations can ensure workload stability and achieve the best cost optimization results with both RIs and Karpenter.

By configuring Karpenter to use only a specific instance family type, you can ensure that steady-state workloads which are allocated for RIs are not impacted by Karpenter’s rightsizing capabilities and cause the RIs to be over-provisioned.

Here’s a suggested configuration to limit the Karpenter choice of instance families to m5:


Ready to cut Infrastructure costs?

BOOK MY LIVE DEMO

Ready to Cut Kubernetes Waste?

BOOK A DEMO