{"id":25705224,"url":"https://github.com/aporia-ai/kubesurvival","last_synced_at":"2025-04-30T09:46:37.417Z","repository":{"id":38349323,"uuid":"350691495","full_name":"aporia-ai/kubesurvival","owner":"aporia-ai","description":"💰 Significantly reduce Kubernetes costs by finding the cheapest machine types that can run your workloads","archived":false,"fork":false,"pushed_at":"2021-11-03T09:30:26.000Z","size":52,"stargazers_count":185,"open_issues_count":3,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-18T23:00:08.646Z","etag":null,"topics":["aws","cost-optimization","domain-specific-language","golang","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aporia-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-23T11:45:28.000Z","updated_at":"2024-05-13T00:08:12.000Z","dependencies_parsed_at":"2022-08-28T09:11:10.319Z","dependency_job_id":null,"html_url":"https://github.com/aporia-ai/kubesurvival","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aporia-ai%2Fkubesurvival","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aporia-ai%2Fkubesurvival/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aporia-ai%2Fkubesurvival/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aporia-ai%2Fkubesurvival/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aporia-ai","download_url":"https://codeload.github.com/aporia-ai/kubesurvival/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240619369,"owners_count":19830202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cost-optimization","domain-specific-language","golang","kubernetes"],"created_at":"2025-02-25T06:38:43.430Z","updated_at":"2025-02-25T06:38:43.950Z","avatar_url":"https://github.com/aporia-ai.png","language":"Go","funding_links":[],"categories":["aws","Repositories","Go"],"sub_categories":[],"readme":"# 💰 KubeSurvival\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/aporia-ai/kubesurvival?sort=semver\u0026style=flat)](https://github.com/aporia-ai/kubesurvival/releases/latest)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/aporia-ai/kubesurvival/Test?label=build%20%26%20tests\u0026style=flat)](https://github.com/aporia-ai/kubesurvival/actions?workflow=test)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e301f215e966335dc6bd/maintainability)](https://codeclimate.com/github/aporia-ai/kubesurvival/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/e301f215e966335dc6bd/test_coverage)](https://codeclimate.com/github/aporia-ai/kubesurvival/test_coverage)\n\nKubeSurvival allows you to **significantly reduce your Kubernetes compute costs** by finding the cheapest machine types that can run your workloads successfully.\n\nIf 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.\n\nTo easily define workloads, KubeSurvival uses a very simple DSL:\n\n```python\n  (\n    # Some microservice\n    pod(cpu: 1, memory: \"1Gi\") + \n\n    # Another microservice - with 3 replicas\n    pod(cpu: \"500m\", memory: \"2Gi\") * 3 +\n\n    # More microservices!\n    (\n      pod(cpu: 1, memory: \"1Gi\") +\n      pod(cpu: \"250m\", memory: \"1Gi\")\n    ) * 3\n  ) * 2  # Production, Staging\n```\n\nThis will give you a result such as:\n\n    Instance type: t3.medium\n    Node count: 11\n    Total Price per Month: USD $340.45\n    \n\u003cp align=\"center\"\u003eMade with :heart: by \u003ca href=\"https://www.aporia.com?utm_source=github\u0026utm_medium=github\u0026utm_campaign=kubesurvival\" target=\"_blank\"\u003eAporia\u003c/a\u003e\u003c/p\u003e\n\n## Installation\n\nDownload a precompiled binary for your operating system from the [Releases](https://github.com/aporia-ai/kubesurvival/releases) page.\n\nAlternatively, if you have Go installed, you can run:\n\n```console\n$ go install github.com/aporia-ai/kubesurvival/v2\n```\n\n## Usage\n\nTo run KubeSurvival:\n\n    ./kubesurvival config.yaml\n\nSee the [examples](examples/) directory for example config files.\n\n## How does it work?\n\nKubeSurvival uses [k8s-cluster-simulator](https://github.com/pfnet-research/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. \n\nFor each simulation it calculates the on-demand cost per month using the [ec2-instances-info](https://github.com/cristim/ec2-instances-info) library. Additionally, it queries the [eni-max-pods.txt](https://github.com/awslabs/amazon-eks-ami/blob/master/files/eni-max-pods.txt) file to determine what's the maximum number of pods in each instance type.\n\nWhen simulating a cluster, KubeSurvival always makes sure you have 10% free CPU and Memory on each node.\n\nFinally, KubeSurvival selects the cheapest configuration without pending pods.\n\n## What's missing from this?\n\nWell... a lot actually. Here's a partial list:\n\n* Support for AKS and GKE\n* Support for calculating costs of EBS storages\n* Support for different node groups (e.g 2 machines with GPU + 4 machines without GPU)\n* and probably much more!\n\nWe would love your help! ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faporia-ai%2Fkubesurvival","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faporia-ai%2Fkubesurvival","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faporia-ai%2Fkubesurvival/lists"}