Self-hosted service
opencost/opencost avatar
opencost/opencost

OpenCost dropped its manifests, and three Helm commands replaced them

Cost monitoring for Kubernetes workloads and cloud costs

6,829 stars934 forksGoApache-2.0

At a glance

What is it?
OpenCost is a Go cost allocation engine for Kubernetes and cloud spend, formed from a written specification plus an implementation and originally open sourced by Kubecost. Installation is now Helm only, the MCP server ships disabled on port 8081, and export quality depends on whether your Prometheus is sharded.
Who is it for?
OpenCost suits a platform team that already runs Kubernetes across more than one namespace and wants cost attribution it can point at its own dashboard rather than at a vendor bill, and that can accept Helm as the only installation path. It does not suit a cluster where you cannot grant billing API credentials, a single namespace where allocation adds nothing, or anyone who needs raw manifests for an offline install.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • opencost/opencost6,829 ★ · +74
Star history
Repository2026-09-232026-11-23
opencost/opencost6.8k6.8k

74 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Helm is the whole install story, and the manifests are gone

OpenCost used to be installable as a raw YAML manifest. It no longer is. The stated rule is that installation and management go through the official Helm chart only, and the standalone Kubernetes manifest files have been removed rather than deprecated. On any Kubernetes 1.20 or newer cluster the whole installation is three commands:

bash
helm repo add opencost https://opencost.github.io/opencost-helm-chart
helm repo update
helm install opencost opencost/opencost

The chart repository is served from a GitHub Pages URL, and the chart is also what every later configuration path hangs off, since the MCP settings shown further down are all Helm values rather than flags. What the manifest removal costs you is any route that avoids Helm: the standalone manifest files are gone. Upgrades inherit the constraint, because a Helm release is now the only object the project hands you to manage.

Allocation is keyed by seven dimensions and priced two ways

The allocation model is the product. Spend is attributed in real time by cluster, node, namespace, controller kind, controller, service and pod, which is what makes the figures usable in a cluster shared by several teams, since a namespace is the unit teams already argue over. Resources counted inside the cluster include CPU, GPU, memory and persistent volumes, so a node holding idle accelerators does not look free. Pricing arrives from two directions. Cloud clusters get on-demand asset prices pulled dynamically through integrations with the AWS, Azure and GCP billing APIs, so the number follows what the provider charges rather than a static list. On-premises clusters have no such API, and there the answer is a custom CSV pricing file you supply.

One Prometheus pod behind a sharded setup truncates the export

Pricing leaves the system through a /metrics endpoint, and that endpoint has one documented failure mode which is easy to miss. If Prometheus runs sharded, in other words in a high availability setup, then `PROMETHEUS_SERVER_ENDPOINT` has to point at a global query endpoint such as Thanos Query, Cortex or Mimir. Point it at a single Prometheus pod instead and the stated outcome is incomplete or intermittent export results. Intermittent is the worse of those two words, because a series that is occasionally short reads as a cost anomaly rather than as a configuration mistake. The variable is given by name, with no note about where the exporter reads it from, which makes it worth confirming what the running pod is aimed at before trusting a trend line.

The MCP server ships switched off on port 8081

The Model Context Protocol server is built into the same Helm chart but disabled in every deployment until you ask for it. The stated reason is to minimize the attack surface, which is a sensible default for something that hands an agent a cost API. Enabling it is one value, and the chart exposes a port and a log level beside it:

bash
helm install opencost opencost/opencost \
  --set opencost.mcp.enabled=true

helm install opencost opencost/opencost \
  --set opencost.mcp.port=9091

helm install opencost opencost/opencost \
  --set opencost.mcp.extraEnv.MCP_LOG_LEVEL=debug

Once it runs, 8081 is where a client connects, and the documented way to reach it from your own machine is a forward from the service rather than an exposed ingress:

bash
kubectl port-forward svc/opencost 8081:8081

Three query families sit behind it: allocation data with filtering and aggregation, asset data covering nodes, disks and load balancers, and cloud cost data filtered by provider, service and region, over plain HTTP. Cursor is named as one client to configure against it.

Tilt puts the UI and Prometheus on the same port

Development runs through Tilt, and the first collision shows up immediately:

bash
# Clone and start OpenCost with MCP server
# You may also need to clone opencost-ui and opencost-helm-charts repositories
# Make sure the cloned repositories are in the same parent tree as opencost

git clone https://github.com/opencost/opencost.git
cd opencost
tilt up

The UI and Prometheus both come up on port 9090, so reaching both at once means forwarding one of them elsewhere. The clone also assumes siblings: opencost-ui and opencost-helm-charts need fetching too, and the repositories have to sit in the same parent tree. Cloud cost ingestion, which is the half that wants a provider billing API, is turned on in development through the dev values file:

yaml
# tilt-values.yaml (excerpt)
opencost:
  exporter:
    extraEnv:
      CLOUD_COST_ENABLED: "true"
      CLOUD_COST_CONFIG_PATH: "/var/cloud-integration/cloud-integration.json"

So even locally you are pointing at a mounted credential file.

The default branch is develop and the build stamps its own version

The default branch is develop, not main, so a plain clone lands on the integration branch rather than on a released state. Releases are tagged separately, and the three most recent are v1.121.1, v1.121.2 and v1.121.3, dated 2026-08-05, 2026-09-11 and 2026-09-16, while the last push to the repository was on 2026-10-29. Version identity is assembled at build time instead of being read from a file, and the Makefile is explicit about it:

make
IMAGE_TAG ?= $(shell ./tools/image-tag)
GIT_REVISION := $(shell git rev-parse --short HEAD)

VPREFIX := github.com/opencost/opencost/core/pkg/version
GO_LDFLAGS   := -X $(VPREFIX).Version=$(IMAGE_TAG) -X $(VPREFIX).GitCommit=$(GIT_REVISION)

go/bin:
	CGO_ENABLED=0 $(GO) build $(GO_FLAGS) ./cmd/costmodel

The binary is costmodel, built with CGO disabled, and the version strings are pushed into a core package version path through ldflags. The task runner in the justfile keeps the same shape, with a format target that formats the root and then walks into each nested module.

Inference cost is priced per token with a KV cache correction

The newest line of accounting is for AI inference. Instead of a node or a pod, the unit is a token: cost per million tokens, split into input and output, with pricing corrected for KV cache use so a cached prefix is not billed as fresh input. The target is described as vLLM based deployments, naming llm-d and anything compatible, and the figures come out through both REST APIs and Prometheus metrics. Shared infrastructure attribution is called out as part of it, which is the difficult half, because when one GPU box carries several models the question is not what the box cost but what share of it each workload caused. The detailed accounting sits in docs/inference-cost-tracking.md in the repository rather than on the site.

One SDK in the dependency list is already archived

The Go module is the honest place to look for the project's obligations. It declares Go 1.26.4, and it is not a single module: core, collector-source and prometheus-source are separate modules wired in through replace directives pointing at local directories, which is why format and test targets have to walk into each one. The provider SDKs are where the weight sits, with both generations of the AWS client present at once, aws-sdk-go next to aws-sdk-go-v2, plus Athena, EC2, S3 and STS. Azure appears twice as well, the sdk-for-go v68 marked incompatible beside the newer azcore and azidentity modules, and the Aliyun client carries this in-file comment:

go
github.com/aliyun/alibaba-cloud-sdk-go v1.63.107 // Todo: Upgrade to V2 SDK as V1 is now archived

That one line is the clearest statement of upgrade debt in the repository. The same list reaches well past the three large providers, adding BigQuery, Cloud Storage, the DigitalOcean godo client, hashicorp go-plugin and kubecost/events, so the cost model is not a small program even though its interface is one Helm chart. Licensing is the easy part: Apache 2.0 for the project, with NOTICE and THIRD_PARTY_LICENSES.txt sitting beside it.

Editorial conclusion

OpenCost suits a platform team that already runs Kubernetes across more than one namespace and wants cost attribution it can point at its own dashboard rather than at a vendor bill, and that can accept Helm as the only installation path. It does not suit a cluster where you cannot grant billing API credentials, a single namespace where allocation adds nothing, or anyone who needs raw manifests for an offline install. Before you commit, check which Prometheus the exporter actually reads, whether that Prometheus is sharded, and how idle capacity is split, since that split is what teams will be charged for. Then read THIRD_PARTY_LICENSES.txt rather than assuming the Apache 2.0 file covers the bundled cloud SDKs.

Frequently asked questions

How does OpenCost work?

OpenCost combines a written specification with a Go implementation that allocates Kubernetes and cloud spend in real time by cluster, node, namespace, controller kind, controller, service and pod, then exports the result to Prometheus through a /metrics endpoint. On-demand asset pricing comes from integrations with the AWS, Azure and GCP billing APIs, and on-premises clusters are covered with custom CSV pricing.

What are the key differences between OpenCost and Kubecost?

The stated origin is that OpenCost was developed and open sourced by Kubecost, and that this project combines a specification with a Golang implementation of it.

Is OpenCost free?

Yes, as a free and open source distribution under the Apache 2.0 licence. The repository also carries a NOTICE file and a THIRD_PARTY_LICENSES.txt, which matters because the Go dependencies pull in cloud SDKs from several providers.

How do I install OpenCost on Kubernetes?

Add the chart repository, update it, and install the chart on any Kubernetes 1.20 or newer cluster. Standalone Kubernetes manifest files have been removed, so Helm is the documented path for installation and for upgrades alike.

Official sources

  1. License: Apache-2.0
  2. opencost/opencost on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/opencost-opencost.svg)](https://hysenlabs.com/projects/opencost-opencost)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/opencost-opencost.svg)](https://hysenlabs.com/projects/opencost-opencost)

Was this useful?