💰 Significantly reduce Kubernetes costs by finding the cheapest machine types that can run your workloads

💰 KubeSurvival

GitHub release (latest SemVer) GitHub Workflow Status Maintainability Test Coverage

KubeSurvival allows you to significantly reduce your Kubernetes compute costs by finding the cheapest machine types that can run your workloads successfully.

If you have a multi-tenant environment, ML training jobs, a large number of ML model servers, etc, this tool can help you optimize your K8s compute costs.

To easily define workloads, KubeSurvival uses a very simple DSL:

  (
    # Some microservice
    pod(cpu: 1, memory: "1Gi") + 

    # Another microservice - with 3 replicas
    pod(cpu: "500m", memory: "2Gi") * 3 +

    # More microservices!
    (
      pod(cpu: 1, memory: "1Gi") +
      pod(cpu: "250m", memory: "1Gi")
    ) * 3
  ) * 2  # Production, Staging

This will give you a result such as:

Instance type: t3.medium
Node count: 11
Total Price per Month: USD $340.45

Made with ❤️ by Aporia

Installation

Download a precompiled binary for your operating system from the Releases page.

Alternatively, if you have Go installed, you can run:

$ go install github.com/aporia-ai/kubesurvival/v2

Usage

To run KubeSurvival:

./kubesurvival config.yaml

See the examples directory for example config files.

How does it work?

KubeSurvival uses k8s-cluster-simulator to simulate Kubernetes pod scheduling, without running on the actual underlying machines. It iterates over all possible instance types and node counts, simulates a K8s cluster with your workload, and checks if there are any pending pods.

For each simulation it calculates the on-demand cost per month using the ec2-instances-info library. Additionally, it queries the eni-max-pods.txt file to determine what's the maximum number of pods in each instance type.

When simulating a cluster, KubeSurvival always makes sure you have 10% free CPU and Memory on each node.

Finally, KubeSurvival selects the cheapest configuration without pending pods.

What's missing from this?

Well... a lot actually. Here's a partial list:

  • Support for AKS and GKE
  • Support for calculating costs of EBS storages
  • Support for different node groups (e.g 2 machines with GPU + 4 machines without GPU)
  • and probably much more!

We would love your help! ❤️

Owner
Aporia
The Monitoring Platform for Machine Learning
Aporia
Similar Resources

A note taking app, that you can draw in, syncs to the cloud, and is on most platforms!

About NotDraw About · How to contribute · How to run · Trello · FAQ This is achived because I dont want to work on it anymore Structure Codebase Descr

Jul 11, 2022

This is a small Go program, which can tell you what processes are actively using a set of files

winuse This is a small Go program, which can tell you what processes are actively using a set of files. It primarily exists to show off how one can bi

Jan 28, 2022

With this small library you can interact with the timev2 API

Library for timev2 With this small library you can interact with the timev2 API.

Jan 28, 2022

InkCaller is an API to call Ink. Each new call is independent and can be executing concurrently

inkcaller This library InkCaller is an API to call Ink. Each new call is independent and can be executing concurrently. A call will force the ink stat

Feb 8, 2022

kubernetes client

k8sshell 为了更好的展示我们所需要的信息 Prepare 执行 build.sh 拷贝 编译后的二进制到 kubectl 所在目录。 examples kevindeMacBook-Air:src kevin$ kubectl info get pod -n namespace N

Sep 18, 2022

A simple Kubernetes-native CI system for the Bhojpur.NET Platform.

Bhojpur Piro - Kubernetes-native CI A simple Kubernetes-native CI system applied by the Bhojpur.NET Platform. It knows no pipelines, just the jobs and

Apr 28, 2022

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

May 7, 2022

Sync your bank transactions with google sheets using Open Banking APIs

Sync your bank transactions with google sheets using Open Banking APIs

Jul 22, 2022

Lambda stack to turn off and destroy all resources from your personal AWS Account to avoid billing surprises

Lambda stack to turn off and destroy all resources from your personal AWS Account to avoid billing surprises

AWS, Turn off my Account, please Lambda stack to turn off and destroy all resources from your personal AWS Account to avoid billing surprises Resource

Oct 25, 2022
Comments
  • Include instance storage constraints

    Include instance storage constraints

    I run multiple workloads that require instance store (ephemeral storage vs regular EBS). It would be great if this tool could factor that into it's calculations so it would know I could use r6gd vs r6g.

This library implements the pub/sub pattern in a generic way. It uses Go's generic types to declare the type of the event.

observer This library implements the pub/sub pattern in a generic way. It uses Go's generic types to declare the type of the event. Usage go get githu

Nov 16, 2022
A simple self-hostable Machine Translation service, powered by spaGO

A simple self-hostable Machine Translation service, powered by spaGO

Nov 9, 2022
Run proprietary modpack in built in Darwin/macOS sandbox-exec to prevent it from doing malicious things.
Run proprietary modpack in built in Darwin/macOS sandbox-exec to prevent it from doing malicious things.

sandbox-exec lunarclient Run LunarClient in built in Darwin/macOS sandbox-exec to prevent lunar from taking screenshots of your desktop. LunarClient l

Jul 12, 2022
A compute service that lets you run code without provisioning or managing servers

AWS Lambda for Go Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availab

Oct 13, 2021
This bot require you to run the GETH client + use ethers framework.

Mad Liquidity Sniper This bot require you to run the GETH client + use ethers framework. All addresses and private keys contained have been changed fo

Oct 19, 2021
Run vscode task in command line

vstask Run vscode task in command line install go install "github.com/ttttmr/vstask" usage NAME: vstask - Run vscode task in command line USAGE:

Jul 1, 2022
A simple api built in Go that facilitates directly sending email from your client side html to your inbox

go-email-service A simple api built in Go that facilitates directly sending emai

Dec 28, 2021
Automate all the tasks you can do in NeteaseCloudMusic

Fuck163MusicTasks 自动完成网易云音乐人任务并领取云豆 说白了就是白嫖网易云年费黑胶 ✨ 特性 web/Android 双平台每日签到 音乐人每日签到(登录音乐人中心) 自动发布动态(音乐人每日任务) 自动回复粉丝评论(音乐人每日任务) 自动恢复粉丝私信(音乐人每日任务) 自动领取已

Jan 5, 2023
This repository shows how can we use `AWS Lambda` to build serverless applications in golang.

Serverless Api in Go with AWS Lambda Here we are going to use AWS Lambda to build serverless applications in golang. Prerequisites You’ll need an AWS

Nov 3, 2021
Authorization can be hard, and this project aims to be simple solution to general authz problems.

racl (rest access control lists) Motivation Authorization can be hard, and this project aims to be simple solution to general authz problems. Mainly,

Nov 9, 2021