4 minute read

Unlock Kubernetes Savings with Kubecost's Automated Actions

Introduction

Spending money on Kubernetes is simple; you can start running a cluster with just a few clicks. However, making your Kubernetes environment more efficient to drive cost savings can be quite difficult, requiring both a high level of Kubernetes expertise and a significant investment of time. Kubecost’s new automated savings functionality, Kubecost Actions, is now available for free in Kubecost self-hosted empowering users to save money with just a few clicks. Let’s take a look at these new Kubernetes Savings Automations.

Kubecost Actions Overview

Create New Action

Starting in the Kubecost 2.0 release, Kubecost provides three powerful actions (automations) that all users can leverage for free to drive efficiency and cost savings in your Kubernetes clusters:

  • Automated Request Sizing
  • Cluster Turndown
  • Namespace Turndown

Automated Request Sizing

By reviewing the resource requests your containers currently have in place, you can uncover significant inefficiencies and savings opportunities. It is extremely common (and understandable) for developer teams to set container requests far higher than necessary to ensure that the container runs and scales. However, consistently over-provisioning your containers can result in a massively inefficient Kubernetes environment, leading to significantly higher spending than needed. Identifying and addressing these inefficiencies can lead to substantial cost savings.

Container Request Right-Sizing Recomendations

Kubecost’s container right-sizing recommendations (displayed in the image above) shows you the savings available from ‘right-sizing’ your container requests. This Kubecost dashboard shows each container’s average and max usage, current request, as well as a recommended request. The recommendations Kubecost makes for each container’s request can be tuned based on the environment type (Development, Production, or High Availability) and usage (time window, and average/max usage).

Implementing Kubecost’s recommendations for each container request can lead to significant savings — we’ve seen cases where users saved over $1,000,000 in just a couple of months! However, updating the resource requests for each container manually can take a long time and is not always a ‘one-and-done’ process — you will want to update your container requests as your application grows in complexity or scales.

Kubecost’s Automated Request Sizing feature is designed to save you time and effort. It makes it easy to update your container requests to avoid wasting money on over-provisioned containers. Simply set a schedule for the automation, select the deployments whose container requests should be right-sized, and configure how Kubecost should generate the request recommendations (lookback window and target utilization). Kubecost automated request sizing will then resize the container requests for the relevant deployments on the defined schedule — freeing up resources that can then be turned down or used for other applications.

Automated Request Sizing

Cluster and Namespace Turndown

Namespace Turndown

Many, if not all, teams running Kubernetes have ‘development’ clusters or namespaces which are used to test code changes or run experiments. Development environments, demo environments, or other internal tooling may not need to be running at night or on weekends when nobody is using those tools or environments. However, even when these environments aren’t being used, you are still spending (wasting) money hosting this infrastructure. With Kubecost’s cluster and namespace turndown automation, you can significantly reduce these costs.

Kubecost’s cluster and namespace turndown automation makes it incredibly easy to turn off clusters or namespaces when they are not needed and then automatically turn them back on when needed. All you need to do is define your schedule with a daily, weekly, or monthly cadence, or write a cron schedule if you prefer more customization and set the namespaces or clusters you want to be turned down. Additionally, if you prefer, you are able to configure Kubecost Automated Request Sizing via a .yaml file which can be integrated and governed as part of your CI/CD pipeline! This level of control puts you in the driver’s seat, empowering you to manage your resources efficiently.

Namespace turndown has two Schedule Types: Scheduled and Smart.

Scheduled Namespace turndown allows you to set a specific time for the turndown to occur, and Smart Namespace turndown will automatically (and exclusively) turndown namespaces that are only running idle or abandoned workloads. Idle workloads are defined as workloads which have not sent or received a meaningful rate of traffic. You can visit our Abandoned Workloads dashboard (example in the image below) to learn more and see which pods appear to be idle.

Abandoned Workloads

How do I get started?

Start saving money by installing Kubecost today and leverage Kubecost Actions.

For our AWS and GCP users (Azure support is in the works), Kubecost Actions is available for free!! To get started, you need the base install of Kubecost and installation of the Kubecost Cluster Controller.

After setting up the service key in your cloud provider, you only need to enable the cluster controller in the Helm Chart to kick off the installation.

clustercontroller:
  enabled: true

If you have any questions or ideas for other automation to help you save money, don’t hesitate to reach out to us at team@kubecost.com or join our Slack Community.