# opencost/opencost

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/opencost-opencost).**

6,605 stars · 829 forks · Go · Apache-2.0

## Links

- GitHub: https://github.com/opencost/opencost
- Homepage: http://opencost.io
- awesome-repositories: https://awesome-repositories.com/repository/opencost-opencost.md

## Topics

`aws` `azure` `cncf` `cost` `cost-optimization` `finops` `gcp` `k8s` `kubernetes` `monitoring` `opencost` `prometheus`

## Description

OpenCost is an open-source tool for monitoring and allocating Kubernetes and cloud infrastructure costs. It provides real-time visibility into spending by distributing asset costs to workloads based on resource requests and usage, breaking down spend by namespace, deployment, pod, and label. The system functions as both a Kubernetes cost allocation engine and a multi-cloud cost analyzer, ingesting billing data from AWS, Azure, and GCP to present unified cost metrics alongside cluster costs.

The tool distinguishes itself through its allocation-based cost model, which compares requested versus used resources to distribute infrastructure costs to Kubernetes workloads. It integrates directly with cloud provider billing APIs to fetch dynamic pricing for accurate resource valuation, and supports custom pricing for on-premises environments through CSV imports. OpenCost also offers a Model Context Protocol server that exposes cost and allocation data for programmatic querying by AI agents and automation tools, alongside a REST API and kubectl plugin for traditional integration and command-line access.

The platform provides multiple ways to visualize and export cost data, including pre-built Grafana dashboards, an interactive web dashboard, and export pipelines to CSV and Parquet formats. It tracks historical cost trends, calculates idle costs, distributes shared costs across tenants, and reports estimated carbon footprints for cloud resources. Deployment is managed through a Helm chart with configurable storage, Prometheus, and cloud provider settings, and the system can connect to existing Prometheus-compatible stores for metrics ingestion.

## Tags

### DevOps & Infrastructure

- [Kubernetes Cost Allocations](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/kubernetes-cost-allocations.md) — Allocates cloud and infrastructure costs to Kubernetes workloads by namespace, deployment, pod, and label.
- [Billing API Integrations](https://awesome-repositories.com/f/devops-infrastructure/cloud-billing-management/billing-api-integrations.md) — Connects to AWS, Azure, and GCP billing APIs to ingest and reconcile external cost data with cluster usage.
- [Helm Chart Deployment](https://awesome-repositories.com/f/devops-infrastructure/helm-chart-management/helm-chart-deployment.md) — Installs the full cost monitoring stack including Kubernetes cost allocations, cloud costs, and web UI using a Helm chart. ([source](https://www.opencost.io/docs/installation/install))
- [Resource Cost Management](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management.md) — Breaks down cloud spend by Kubernetes concepts such as namespace, deployment, and container. ([source](https://opencost.io/))
- [Cloud Cost Analytics](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics.md) — Retrieves cloud provider cost data from their cost and usage reports for billing integration. ([source](https://www.opencost.io/docs/integrations/api))
- [Cloud Cost Source Connections](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/cloud-cost-source-connections.md) — Connects external cloud provider accounts to import and display their cost data alongside cluster costs. ([source](https://opencost.io/docs/configuration/on-prem/))
- [Multi-Cloud Cost Analyzers](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/multi-cloud-cost-analyzers.md) — Ingests billing data from AWS, Azure, and GCP to display unified cost metrics across cloud providers.
- [Multi-Cloud Cost Monitors](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/multi-cloud-cost-monitors.md) — Tracks current and historical spending across AWS, Azure, and GCP from a single interface alongside cluster costs.
- [Multi-Provider Spend Views](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/multi-provider-spend-views.md) — Tracks current and historical costs across AWS, Azure, and GCP from a single interface. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Cost Data Exporters](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-estimators/cost-data-exporters/cost-data-exporters.md) — Exports cost metrics to Prometheus, CSV, and Parquet and displays them in Grafana dashboards and a built-in UI.
- [Cost Visualization Dashboards](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards.md) — Provides an interactive web dashboard for viewing configured cloud provider costs alongside Kubernetes costs. ([source](https://opencost.io/docs/installation/docker))
- [Cost and Usage Querying](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards/cost-and-usage-querying.md) — Provides programmatic retrieval of Kubernetes workload cost allocation metrics via a REST API. ([source](https://www.opencost.io/docs/integrations/kubectl-cost))
- [Cluster Asset Cost Measurements](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards/cost-and-usage-querying/cluster-asset-cost-measurements.md) — Calculates costs for nodes, persistent volumes, attached disks, and load balancers. ([source](https://opencost.io/docs/specification))
- [Cluster Asset Cost Queries](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards/cost-and-usage-querying/cluster-asset-cost-queries.md) — Retrieves backing cost data broken down by individual cluster assets such as nodes and disks. ([source](https://www.opencost.io/docs/integrations/api))
- [Grafana Cost Dashboards](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards/grafana-cost-dashboards.md) — Ships pre-built Grafana dashboards for visualizing Kubernetes and cloud cost breakdowns. ([source](https://opencost.io/docs/integrations/))
- [In-Cluster Resource Cost Allocations](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/in-cluster-resource-cost-allocations.md) — Assigns costs to in-cluster resources including CPU, GPU, memory, load balancers, and persistent volumes. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Kubernetes Resource Cost Allocations](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/kubernetes-resource-cost-allocations.md) — Breaks down spend by cluster, node, namespace, controller, service, or pod for real-time visibility. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Kubectl Plugins](https://awesome-repositories.com/f/devops-infrastructure/kubectl-plugins.md) — Ships a kubectl plugin for running cost queries directly from the command line. ([source](https://www.opencost.io/docs/installation/install))
- [Cost Query Plugins](https://awesome-repositories.com/f/devops-infrastructure/kubectl-plugins/cost-query-plugins.md) — Provides a kubectl plugin for querying cost and allocation data from the command line.
- [Custom Pricing Configurations](https://awesome-repositories.com/f/devops-infrastructure/on-premise-deployment/custom-pricing-configurations.md) — Supports custom pricing via CSV imports for on-premises clusters and negotiated rate overrides for cloud providers.
- [Billing Data Queries](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/billing-data-queries.md) — Retrieves aggregated cloud billing data over time windows by provider or service via API. ([source](https://opencost.io/docs/installation/docker))
- [Cost API Servers](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cloud-cost-analytics/cost-api-servers.md) — Provides a REST API that exposes Kubernetes and cloud cost data for programmatic querying and external tool integration.
- [Idle Cost Calculations](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-estimators/render-cost-calculators/idle-cost-calculations.md) — Measures the cost-weighted difference between total asset costs and allocated workload costs. ([source](https://opencost.io/docs/specification))
- [MCP Cost Queries](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-visualization-dashboards/cost-and-usage-querying/mcp-cost-queries.md) — Exposes cost and allocation data through a Model Context Protocol server for programmatic querying by AI agents and automation tools.

### Part of an Awesome List

- [Billing API Integrations](https://awesome-repositories.com/f/awesome-lists/devtools/cloud-billing-resources/billing-api-integrations.md) — Fetches on-demand pricing and usage data from AWS, Azure, and GCP billing APIs for cost valuation.

### Business & Productivity Software

- [Cloud Cost Allocations](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/cloud-cost-allocations.md) — Distributes cloud infrastructure expenses to Kubernetes workloads using a vendor-neutral specification. ([source](https://opencost.io/docs/))
- [Kubernetes Cost Allocation Queries](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/kubernetes-cost-allocation-queries.md) — Retrieves Kubernetes workload costs and resource allocation over specified time windows. ([source](https://www.opencost.io/docs/integrations/api))
- [Kubernetes Cost Allocations](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/kubernetes-cost-allocations.md) — Displays real-time and historical cost breakdowns for Kubernetes resources organized by namespace, deployment, or label. ([source](https://www.opencost.io/docs/installation/ui))
- [Kubernetes Cost Engines](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/kubernetes-cost-engines.md) — Distributes asset costs to Kubernetes workloads based on resource requests and usage for granular spend visibility.
- [Kubernetes Workload Allocations](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/kubernetes-workload-allocations.md) — Distributes infrastructure costs to Kubernetes workloads by comparing requested versus used resources.
- [Kubernetes Workload Cost Allocations](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/kubernetes-workload-cost-allocations.md) — Distributes asset costs to containers, pods, deployments, and other Kubernetes workloads. ([source](https://opencost.io/docs/specification))
- [Billing API Price Fetches](https://awesome-repositories.com/f/business-productivity-software/price-list-management/pricing-trackers/product-price-comparators/cloud-pricing-comparison/billing-api-price-fetches.md) — Fetches dynamic pricing from cloud billing APIs to accurately value Kubernetes resources. ([source](https://opencost.io/))
- [Cloud Provider Pricing Configurations](https://awesome-repositories.com/f/business-productivity-software/price-list-management/pricing-trackers/product-price-comparators/cloud-pricing-comparison/cloud-provider-pricing-configurations.md) — Sets pricing data for AWS, Azure, GCP, or on-premise environments through Helm chart values. ([source](https://opencost.io/docs/installation/helm))
- [Kubernetes Asset Valuations](https://awesome-repositories.com/f/business-productivity-software/price-list-management/pricing-trackers/product-price-comparators/cloud-pricing-comparison/kubernetes-asset-valuations.md) — Fetches on-demand pricing from cloud billing APIs to reflect current Kubernetes resource costs. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Shared Cost Distributions](https://awesome-repositories.com/f/business-productivity-software/payment-cost-management-systems/cost-allocation-dimensions/shared-cost-distributions.md) — Spreads system workload, idle, and overhead costs across tenants using various distribution methods. ([source](https://opencost.io/docs/specification))
- [Multi-Provider Normalizations](https://awesome-repositories.com/f/business-productivity-software/price-list-management/pricing-trackers/product-price-comparators/cloud-pricing-comparison/multi-provider-normalizations.md) — Normalizes CPU, GPU, memory, and storage costs across cloud and on-premise environments.
- [On-Premises Pricing Configurations](https://awesome-repositories.com/f/business-productivity-software/pricing-structures/customer-defined-pricing/on-premises-pricing-configurations.md) — Supports custom pricing for on-premises Kubernetes environments through CSV imports. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Cloud Provider Pricing Overrides](https://awesome-repositories.com/f/business-productivity-software/pricing-structures/model-pricing-overrides/cloud-provider-pricing-overrides.md) — Replaces default list prices with custom negotiated rates per provider for accurate cost calculations. ([source](https://opencost.io/docs/configuration/))
- [Node Pricing Overrides](https://awesome-repositories.com/f/business-productivity-software/pricing-structures/model-pricing-overrides/node-pricing-overrides.md) — Overrides default node pricing by supplying custom CPU, RAM, and persistent volume costs. ([source](https://opencost.io/docs/configuration/on-prem/))
- [Resource Price Derivations](https://awesome-repositories.com/f/business-productivity-software/resource-pricing-configurations/resource-price-derivations.md) — Normalizes CPU, GPU, and RAM costs from provider billing data when explicit prices are unavailable. ([source](https://opencost.io/docs/specification))

### Development Tools & Productivity

- [REST APIs](https://awesome-repositories.com/f/development-tools-productivity/rest-apis.md) — Provides a REST API for programmatic retrieval of Kubernetes and cloud cost data. ([source](https://www.opencost.io/docs/installation/install))

### System Administration & Monitoring

- [Cloud Account Connectors](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/cross-account-observability-aggregators/account-connection-management/cloud-account-connectors.md) — Connects cloud provider accounts to ingest billing data and reconcile it with cluster usage. ([source](https://opencost.io/docs/integrations/))
- [Cost Monitors](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/infrastructure-monitoring/kubernetes-monitors/cost-monitors.md) — Shows real-time and historical cost data for Kubernetes resources broken down by namespace, deployment, or label. ([source](https://opencost.io/docs/))
- [Prometheus Metric Ingestion](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-metric-ingestion.md) — Ingests resource usage and pricing metrics from Prometheus-compatible stores for cost allocation.
- [Cost Trend Analyzers](https://awesome-repositories.com/f/system-administration-monitoring/trend-analysis/cost-trend-analyzers.md) — Displays historical cost trends over configurable time periods with projected monthly costs. ([source](https://www.opencost.io/docs/integrations/kubectl-cost))
- [Cloud Service Cost Trackers](https://awesome-repositories.com/f/system-administration-monitoring/external-service-monitoring/cloud-service-cost-trackers.md) — Tracks spend on cloud-managed services outside the cluster, such as object storage and databases. ([source](https://opencost.io/))
- [Cost Data Prometheus Exports](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-exporters/cost-data-prometheus-exports.md) — Exports pricing and resource allocation metrics to Prometheus for querying with custom PromQL queries. ([source](https://opencost.io/))
- [Cost Metrics Endpoints](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-exporters/prometheus-based-metric-exporters/cost-metrics-endpoints.md) — Exposes pricing and allocation data through a /metrics endpoint for integration with monitoring pipelines. ([source](https://cdn.jsdelivr.net/gh/opencost/opencost@develop/README.md))
- [Cost Metrics Exporters](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-exporters/prometheus-based-metric-exporters/cost-metrics-exporters.md) — Exports pricing and allocation metrics to Prometheus for custom cost queries and Grafana dashboards.
- [Prometheus Instance Connections](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-exporters/prometheus-instance-connections.md) — Connects to a user-supplied Prometheus server to collect cost metrics via scrape configuration. ([source](https://opencost.io/docs/installation/prometheus))
- [Prometheus-Compatible Metric Ingestion](https://awesome-repositories.com/f/system-administration-monitoring/prometheus-metric-ingestion/prometheus-compatible-metric-ingestion.md) — Pulls cost and resource metrics from Prometheus, Cortex, Thanos, or Victoria Metrics endpoints for real-time allocation. ([source](https://opencost.io/docs/integrations/))

### Artificial Intelligence & ML

- [Cost Data Exposures](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-servers/cost-data-exposures.md) — Ships an MCP server that exposes Kubernetes and cloud cost data for AI agent querying. ([source](https://opencost.io/docs/integrations/))
- [Kubernetes Label Cost Filters](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-cost-management/cost-data-filters/kubernetes-label-cost-filters.md) — Filters cost data by Kubernetes labels to show total costs for specific resources. ([source](https://www.opencost.io/docs/integrations/kubectl-cost))
- [MCP Servers](https://awesome-repositories.com/f/artificial-intelligence-ml/mcp-servers.md) — Provides an MCP server for querying cost data via AI agents and automation tools. ([source](https://www.opencost.io/docs/installation/install))
- [Model Context Protocol Servers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-context-protocol-servers.md) — Serves cost and allocation data through a Model Context Protocol server for AI agent querying.
