Get startedSign in
Back

Kubecost

Kubecost is a cost monitoring and cost optimization solution for teams running Kubernetes, helping teams to reduce Kubernetes spend in the cloud.

Available providers

Why use Kubecost on Plural?

While cost optimization with Kubecost is quick and easy, deploying and setting up the application itself is complex and requires specific (cloud) infrastructure, networking and Kubernetes knowledge.

Plural helps you deploy and manage the lifecycle of open-source applications on Kubernetes. Our platform combines the scalability and observability benefits you get with managed SaaS offerings with the data security, governance, and compliance benefits of self-hosting Kubecost.

If you need more than just Kubecost, take a look at Plural’s DevOps stack, a pre-integrated deployment of Kubecost, Grafana, and Argo CD, or look for other open-source DevOps tools in our marketplace of curated applications to leapfrog complex deployments and get started quickly.

Kubecost’s websiteGitHubInstalling Kubecost docs
Deploying Kubecost is a matter of executing these 3 commands:
plural bundle install kubecost kubecost-aws
plural build
plural deploy --commit "deploying kubecost"
Read the install documentation

Kubecost

Kubecost models give teams visibility into current and historical Kubernetes spend and resource allocation. These models provide cost transparency in Kubernetes environments that support multiple applications, teams, departments, etc.

Kubecost allocation UI

To see more on the functionality of the full Kubecost product, please visit the features page on our website. Here is a summary of features enabled by this cost model:

  • Real-time cost allocation by Kubernetes service, deployment, namespace, label, statefulset, daemonset, pod, and container
  • Dynamic asset pricing enabled by integrations with AWS, Azure, and GCP billing APIs
  • Supports on-prem k8s clusters with custom pricing sheets
  • Allocation for in-cluster resources like CPU, GPU, memory, and persistent volumes.
  • Allocation for AWS & GCP out-of-cluster resources like RDS instances and S3 buckets with key (optional)
  • Easily export pricing data to Prometheus with /metrics endpoint (learn more)
  • Free and open source distribution (Apache2 license)

Requirements

  • Kubernetes version 1.8 or higher
  • Prometheus
  • kube-state-metrics (optional)

Getting Started

You can deploy Kubecost on any Kubernetes 1.8+ cluster in a matter of minutes, if not seconds. Visit the Kubecost docs for recommended install options. Compared to building from source, installing from Helm is faster and includes all necessary dependencies.

Usage

Contributing

We :heart: pull requests! See CONTRIBUTING.md for information on buiding the project from source and contributing changes.

Licensing

Licensed under the Apache License, Version 2.0 (the "License")

Software stack

Golang application. Prometheus. Kubernetes.

Frequently Asked Questions

How do you measure the cost of CPU/RAM/GPU/storage for a container, pod, deployment, etc.

The Kubecost model collects pricing data from major cloud providers, e.g. GCP, Azure and AWS, to provide the real-time cost of running workloads. Based on data from these APIs, each container/pod inherits a cost per CPU-hour, GPU-hour, Storage Gb-hour and cost per RAM Gb-hour based on the node where it was running or the class of storage provisioned. This means containers of the same size, as measured by the max of requests or usage, could be charged different resource rates if they are scheduled in seperate regions, on nodes with different usage types (on-demand vs preemptible), etc.

For on-prem clusters, these resource prices can be configured directly with custom pricing sheets (more below).

Measuring the CPU/RAM/GPU cost of a deployment, service, namespace, etc is the aggregation of its individual container costs.

How do you determine RAM/CPU costs for a node when this data isn’t provided by a cloud provider?

When explicit RAM or CPU prices are not provided by your cloud provider, the Kubecost model falls back to the ratio of base CPU and RAM price inputs supplied. The default values for these parameters are based on the marginal resource rates of the cloud provider, but they can be customized within Kubecost.

These base RAM/CPU prices are normalized to ensure the sum of each component is equal to the total price of the node provisioned, based on billing rates from your provider. When the sum of RAM/CPU costs is greater (or less) than the price of the node, then the ratio between the two input prices are held constant.

As an example, let's imagine a node with 1 CPU and 1 Gb of RAM that costs $20/mo. If your base CPU price is $30 and your RAM Gb price is $10, then these inputs will be normlized to $15 for CPU and $5 for RAM so that the sum equals the cost of the node. Note that the price of a CPU remains 3x the price of a Gb of RAM.

NodeHourlyCost = NORMALIZED_CPU_PRICE * # of CPUS + NORMALIZED_RAM_PRICE * # of RAM Gb

How do you allocate a specific amount of RAM/CPU to an individual pod or container?

Resources are allocated based on the time-weighted maximum of resource Requests and Usage over the measured period. For example, a pod with no usage and 1 CPU requested for 12 hours out of a 24 hour window would be allocated 12 CPU hours. For pods with BestEffort quality of service (i.e. no requests) allocation is done solely on resource usage.

How do I set my AWS Spot estimates for cost allocation?

Modify spotCPU and spotRAM in default.json to the level of recent market prices. Allocation will use these prices, but it does not take into account what you are actually charged by AWS. Alternatively, you can provide an AWS key to allow access to the Spot data feed. This will provide accurate Spot price reconciliation.

Do I need a GCP billing API key?

We supply a global key with a low limit for evaluation, but you will want to supply your own before moving to production.

Please reach out with any additional questions on Slack or via email at team@kubecost.com.

How Plural works

We make it easy to securely deploy and manage open-source applications in your cloud.

Select from 90+ open-source applications

Get any stack you want running in minutes, and never think about upgrades again.

Securely deployed on your cloud with your git

You control everything. No need to share your cloud account, keys, or data.

Designed to be fully customizable

Built on Kubernetes and using standard infrastructure as code with Terraform and Helm.

Maintain & Scale with Plural Console

Interactive runbooks, dashboards, and Kubernetes api visualizers give an easy-to-use toolset to manage application operations.

Learn more
Screenshot of app installation in Plural app

Build your custom stack with Plural

Build your custom stack with over 90+ apps in the Plural Marketplace.

Explore the Marketplace

Used by fast-moving teams at

  • CoachHub
  • Digitas
  • Fnatic
  • FSN Capital
  • Justos
  • Mott Mac

What companies are saying about us

We no longer needed a dedicated DevOps team; instead, we actively participated in the industrialization and deployment of our applications through Plural. Additionally, it allowed us to quickly gain proficiency in Terraform and Helm.

Walid El Bouchikhi
Data Engineer at Beamy

I have neither the patience nor the talent for DevOps/SysAdmin work, and yet I've deployed four enterprise-caliber open-source apps on Kubernetes... since 9am today. Bonkers.

Sawyer Waugh
Head of Engineering at Justifi

This is awesome. You saved me hours of further DevOps work for our v1 release. Just to say, I really love Plural.

Ismael Goulani
CTO & Data Engineer at Modeo

Wow! First of all I want to say thank you for creating Plural! It solves a lot of problems coming from a non-DevOps background. You guys are amazing!

Joey Taleño
Head of Data at Poplar Homes

We have been using Plural for complex Kubernetes deployments of Kubeflow and are excited with the possibilities it provides in making our workflows simpler and more efficient.

Jürgen Stary
Engineering Manager @ Alexander Thamm

Plural has been awesome, it’s super fast and intuitive to get going and there is zero-to-no overhead of the app management.

Richard Freling
CTO and Co-Founder at Commandbar

Case StudyHow Cayena Went From Zero to Production in One Day With Plural

The team at Cayena needed a way to quickly and consistently deploy open-source applications like Airbyte into production environments. To Cayena, the most important thing is to deliver fast and powerful applications onto Kubernetes without being specialists in it.

Before using Plural, Cayena came really close to hiring a Kubernetes specialist to handle the deployment and monitoring of applications on Kubernetes. While the opportunity didn’t work out, Cayena’s data applications are operating fine thanks to Plural, which Oriel compared to having a DevOps specialist on board.

Cayena’s Data Stack

FAQ

Plural is open-source and self-hosted. You retain full control over your deployments in your cloud. We perform automated testing and upgrades and provide out-of-the-box Day 2 operational workflows. Monitor, manage, and scale your configuration with ease to meet changing demands of your business. Read more.

We support deploying on all major cloud providers, including AWS, Azure, and GCP. We also support all on-prem Kubernetes clusters, including OpenShift, Tanzu, Rancher, and others.

No, Plural does not have access to any cloud environments when deployed through the CLI. We generate deployment manifests in the Plural Git repository and then use your configured cloud provider's CLI on your behalf. We cannot perform anything outside of deploying and managing the manifests that are created in your Plural Git repository. However, Plural does have access to your cloud credentials when deployed through the Cloud Shell. Read more.