mrkeyoor.com_
Tue 01 Sept 17:41 UTC
Self-Hostedevaluationupdated 27 Aug 2026

opencost review

OpenCost is a self-hosted cost monitor for Kubernetes workloads and cloud services. It attributes spending to clusters, namespaces, controllers, services, and pods so platform teams can see which workloads consume money and capacity.

+13 / 4dstars / 7d
Verdict

Our OpenCost run installed 458 packages, built successfully in 207 seconds, and passed all 54 measured Go tests, which makes the source a credible base for a Kubernetes cost service. Use it when your cluster already has Prometheus and the team will reconcile its allocation data against provider bills before chargeback. A smaller rightsizing tool or pre-deployment estimator is a better fit when you do not need live, multi-cluster cost attribution.

We ran it

Lab card: what happened when we ran opencostScreenshot of opencost (opencost.io)
Install✓ · 73s458 packages
Build✓ · 207s
Tests✓ · 54s54 passed · 0 failed of 54 (go test)
Repo976 files~230,564 lines of source · 75.1 MB · 16 CI workflows · tests dir

Answers from our run

Does opencost build from source?

Dependencies installed in 73 seconds (458 packages), and the build succeeded in 207 seconds. We cloned commit ba0e947 into a clean Debian container with 3 CPUs and no project-specific setup.

Do opencost's tests pass?

Yes: 54 of 54 passed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use opencost?

Organizations without Kubernetes: the supported installation is an official Helm chart for Kubernetes 1.20 or newer, even if cloud-service costs are part of the desired view.

What are the alternatives to opencost?

Kubecost, Infracost, Goldilocks. Our OpenCost run installed 458 packages, built successfully in 207 seconds, and passed all 54 measured Go tests, which makes the source a credible base for a Kubernetes cost service.

Setup3/5Source checks pass; production still needs Helm, Kubernetes, and Prometheus
Docs4/5Install, APIs, MCP, Prometheus, and cloud paths are documented
Community5/56,704 stars with pushes, releases, issues, and pull requests in August
Maturity4/5Large tested codebase, with pricing and image provenance reports open

Discussed on

  1. hnKubernetes Cost Management with the New OpenCost Plugin for Headlamp57 points
  2. hnOpenCost Adds Open Source Multi-Cloud Cost Monitoring23 points
  3. hnShow HN: Open Source Cloud Costs Monitoring in Docker19 points
  4. hnOpenCost: Open-source cost monitoring for cloud native environments14 points
  5. hnMonitor all your IT Costs in real-time with OpenCost13 points

Who it’s for

Platform teams that need Kubernetes costs split by namespace, workload, service, or pod.
FinOps teams joining cluster allocation with AWS, Azure, or GCP spending.
Operators already using Prometheus and Helm who want cost data through APIs and metrics.
MCP users who want an agent to query allocation, assets, cloud costs, and efficiency data.

Who it’s NOT for

Organizations without Kubernetes: the supported installation is an official Helm chart for Kubernetes 1.20 or newer, even if cloud-service costs are part of the desired view.
Sharded Prometheus operators without a global query endpoint: the README warns that pointing OpenCost at one Prometheus pod can produce incomplete or intermittent exports.
Finance teams that will treat custom prices as invoice truth without reconciliation: open issue 4020 reports hourly CPU and RAM values being divided by about 730 on an OVH bare-metal fallback in version 1.120.4.
Teams that assume an image tag proves the embedded revision: open issue 3888 reports that the 1.120.4 image contained a 1.120.3-era binary, so deployed build metadata should be checked.

Setup reality

Our sandbox installed 458 Go packages in 73 seconds. The build succeeded in 207 seconds, then all 54 measured Go tests passed in 54 seconds with 0 failures. The commit ba0e947 checkout contained 976 files, about 230,564 source lines, and occupied 75.1 MB.

A useful deployment needs Kubernetes 1.20 or newer, Helm, and a working Prometheus endpoint. Cloud billing adds provider credentials and integration configuration. Local source runs still require Prometheus, with kubeconfig or in-cluster access for Kubernetes data. The web UI lives in a separate repository.

Standalone manifests have been removed from the supported installation path. Sharded Prometheus needs Thanos Query, Cortex, Mimir, or another global endpoint. The MCP server is disabled by default and listens on port 8081 when enabled, so exposure and client access need an explicit policy.

OpenCost allocates spend by cluster, namespace, service, and pod

OpenCost answers a question cloud invoices handle badly: which Kubernetes workload consumed the money? It combines cluster resource allocation with cloud pricing, then groups costs by node, namespace, controller, service, or pod. AWS, Azure, and GCP integrations extend the view beyond in-cluster resources. On-premises clusters can supply custom CSV pricing.

The implementation is large enough to treat as infrastructure, not a dashboard add-on. Our commit ba0e947 checkout had 976 files, about 230,564 lines of source, and occupied 75.1 MB. OpenCost also maintains a specification, while its web UI and Helm chart live in separate repositories. This checkout alone is not the complete user-facing installation.

Helm and Prometheus are required for the supported deployment

The README directs every production install through the official Helm chart on Kubernetes 1.20 or newer. Standalone manifests have been removed. Prometheus supplies usage data, and the contribution guide requires PROMETHEUS_SERVER_ENDPOINT even for a local Go run. A team without Prometheus, Helm practices, or cluster metrics has several operating decisions to make before the first cost report.

Our sandbox installed 458 Go packages in 73 seconds. That step succeeded in an unprivileged Debian container with 3 CPUs, 8 GB of RAM, and no secrets. A deployment adds Kubernetes access, the Prometheus endpoint, and provider billing configuration. Sharded Prometheus needs a global query layer such as Thanos Query, Cortex, or Mimir; the README warns that one shard can yield incomplete or intermittent exports.

What happened when we ran it

Our run built OpenCost successfully in 207 seconds. The Go test step then finished in 54 seconds with 54 passed and 0 failed out of 54. Both checks completed at commit ba0e947. They do not validate AWS, Azure, GCP, or on-premises prices because the sandbox had no secrets or live cluster services.

The checkout contained a tests directory and 16 CI workflow files. Our scan found no file named Dockerfile, although the contribution guide documents multi-architecture container builds and refers to Dockerfile.cross. The lab measured the Go repository build, while operators normally consume published images through Helm. Before rollout, verify the chart, image digest, embedded revision, Prometheus route, and provider configuration together.

Custom pricing needs reconciliation before internal chargeback

Open issue 4020 reports a serious but bounded pricing case in OpenCost 1.120.4. On OVH bare-metal nodes that fell back to custom pricing, configured hourly CPU and RAM rates appeared divided by about 730 before node cost calculation. The reporter supplied live metrics, configuration values, and a CSV-provider workaround, but did not identify the exact code line. The report justifies comparing calculated totals with a known node and the provider invoice.

Our 54 passing tests finished with 0 failures, yet they cannot settle a provider-specific runtime report that depends on live configuration and node metadata. Build an acceptance set around your environment: a known node-hour, one persistent volume, one load balancer, and a namespace with predictable requests. Use the result for chargeback only after those totals reconcile within an agreed tolerance.

The opt-in MCP server exposes four cost-query tools

OpenCost includes an HTTP Model Context Protocol server with four documented tools: allocation costs, asset costs, cloud costs, and efficiency recommendations. It is disabled by default and uses port 8081 when enabled. Filters can narrow cloud results by provider, service, region, category, and account. The efficiency tool groups workload data and applies a recommendation buffer.

The MCP feature does not change the data requirements. Answers still depend on Prometheus coverage, provider pricing, the requested window, and choices such as idle-cost sharing. Our 207-second build says the source compiled; it says nothing about whether an agent received accurate costs. Keep the server private without a reviewed exposure design, and compare agent responses with the underlying API queries.

August 2026 activity points to active maintenance

GitHub recorded a push on August 26, 2026. Release v1.121.1 was published on August 5 with AWS Athena result reuse configuration, NAT gateway metrics, GPU allocation work, and pricing changes. GitHub listed 296 combined issues and pull requests. That is a queue rather than a defect count, and current pull requests plus issue updates show ongoing work.

Release discipline still deserves checking. Open issue 3888 reports that image tag 1.120.4 shipped a binary based on a 1.120.3-era revision, 18 commits behind the named tag. This was a specific image and does not establish a problem with v1.121.1. It does make digest pinning and go version -m inspection reasonable deployment checks.

OpenCost suits shared clusters better than simple cloud bills

The strongest use case is a platform team with several namespaces, shared nodes, and an existing Prometheus service. OpenCost can export metrics, answer API queries, track AI inference costs for compatible vLLM deployments, and join cluster allocation with cloud-service spending. Apache-2.0 licensing permits internal changes, while the specification gives vendors and users a common model for cost data.

The source result is reassuring: 458 packages installed, the 207-second build passed, and all 54 measured tests passed in 54 seconds. Adoption still depends on data plumbing and reconciliation. Choose OpenCost for live Kubernetes allocation when the team can own Helm, Prometheus, cloud credentials, and validation. Choose Infracost for change-time estimates or Goldilocks for resource requests when those narrower questions are all you need.

Alternatives

ProjectWhat it isPick it when
KubecostA commercial Kubernetes cost platform from the company that originally opened OpenCost.pick this instead when vendor support and a packaged product matter more than operating the open implementation yourself.
InfracostA cost estimator that comments on infrastructure-as-code changes before deployment.pick this instead when the decision happens in Terraform review rather than from live Kubernetes usage.
GoldilocksA Kubernetes tool focused on resource-request recommendations from Vertical Pod Autoscaler data.pick this instead when rightsizing requests is the main job and full cost allocation is unnecessary.
Cloud CustodianA policy engine that finds and acts on cloud resources using YAML rules.pick this instead when automated governance actions matter more than Kubernetes cost attribution.

What people are saying

  1. [github-trending] opencost/opencost

Sources

  1. OpenCost README
  2. OpenCost repository metadata
  3. OpenCost v1.121.1 release
  4. OpenCost contributing and source build guide
  5. Issue 4020: custom pricing division report
  6. Issue 3888: image and embedded binary mismatch

More self-hosted reviews

v2 · OpenShell · wigolo · Mindwtr · club-3090 · reclip · the whole board →