Key takeaway
- Kubernetes cost analysis explained: how to allocate spend by namespace and team, compare OpenCost with IBM Kubecost, and set up showback step by step.
Kubernetes cost analysis means turning one cloud or data-centre bill into spend per namespace, workload and team. Kubernetes itself does not do this. It schedules pods using their resource requests, so a cluster bill has to be split by a cost tool that reads cluster metrics and joins them to prices. Two tools dominate this job: OpenCost, a vendor-neutral open source project, and Kubecost, which began as open source and is now sold by IBM.
This guide is for platform leads, FinOps owners and architects who need to choose a tool and start allocating cost. It covers what to measure, how Kubecost and OpenCost differ today, a safe setup path, and when a cost tool is not enough. For the platform itself, see our guide to Kubernetes architecture and its components.
Why is Kubernetes cost hard to attribute?
With one application per server, the server bill was the application cost. Containers broke that link. Many pods from many teams share the same nodes, and orchestration hides the machines behind logical objects. According to the Kubernetes documentation, the scheduler places a pod using the resource requests of its containers, while limits are enforced by the kubelet at runtime. That means the cost a team causes is driven by what it requests, not only by what it uses, and the gap between the two is where waste sits.
What should you measure in a Kubernetes cost analysis?
Start with two views of the same bill: the type of resource and the Kubernetes object that consumed it.
| View | What it shows | When it fits |
|---|---|---|
| Compute | Node charges, CPU and memory requested and used | Rightsizing requests and node pools |
| Storage | Persistent volumes and attached disks | Finding orphaned or oversized volumes |
| Network | Load balancers and external traffic charges | Cross-zone and egress review |
| Cluster and namespace | Spend per cluster or per logical division of a cluster | First showback to teams and departments |
| Workload, pod and label | Spend per deployment, service or owner label | Chargeback and unit-cost reporting |
| Idle and shared | Capacity nobody uses, and admin or monitoring overhead | Deciding how to share platform cost fairly |
Namespaces are the usual starting point because they map to teams. Add consistent labels such as team, product and environment early, because every allocation report is only as good as the labels behind it. Keep the admin components in kube-system, the monitoring stack and the logging stack as their own shared-cost lines, so product teams see their own spend and not the platform's.
What is the difference between Kubecost and OpenCost?
OpenCost describes itself as a vendor-neutral open source project for measuring and allocating cloud infrastructure and container costs. Its GitHub page lists the Apache-2.0 licence, allocation by cluster, node, namespace, controller, service and pod, multi-cloud costs for AWS, Azure and GCP, custom pricing for on-premises clusters, and CPU, GPU, memory and persistent volume allocation. CNCF lists OpenCost as an incubating project, accepted in June 2022 and moved to incubating on 25 October 2024.
Kubecost is the commercial product that grew from the same idea. IBM announced its acquisition of Kubecost on 17 September 2024. The kubecost.com address now redirects to IBM's Apptio site, which, according to its site, offers a free Foundations edition (unlimited clusters up to 250 cores, 15-day metric retention, community support) and paid Enterprise editions with unlimited retention, role-based access control and dedicated support. Confirm current editions and limits on the IBM page before you plan around them.
| Tool | What it is | When it fits | Current status (checked 13 Nov 2026) |
|---|---|---|---|
| OpenCost | Open source cost allocation, CNCF incubating | You want a neutral, self-managed base and can run Prometheus yourself | Apache-2.0 licence, CNCF incubating |
| IBM Kubecost Foundations | Free edition of the commercial product | Small estates under the stated core limit that want a UI and recommendations | Sold through IBM; limits as published by IBM |
| IBM Kubecost Enterprise | Paid self-hosted or SaaS editions | Many clusters, long retention, access control, vendor support | Sold through IBM; pricing on request or via IBM store |
The practical rule: if you only need allocation and showback, start with OpenCost. If you need long history, access control across many clusters and a supported vendor, compare the IBM editions. In both cases the cost model is the same idea, so you can switch later without relearning the basics.
How do you set up Kubernetes cost monitoring?
Both tools need cluster metrics and price data. Prometheus is the open source monitoring system that joined CNCF in 2016, and the OpenCost installation page says OpenCost needs it for scraping and storing metrics. That page also gives a Kubernetes 1.21 or later prerequisite. Follow this sequence.
- Check prerequisites. Confirm your Kubernetes version and a working Prometheus on the official OpenCost installation page.
- Install with Helm. OpenCost recommends Helm for the full set of features, including allocations, cloud costs and the web UI. Use the chart and values for your provider from the OpenCost documentation.
- Open the UI. After the pods are ready, port-forward the service. The OpenCost page gives port 9090 for the UI and port 9003 for the API.
- Connect billing data. Add cloud billing integration where you want costs based on your actual bill, and a custom pricing sheet for on-premises nodes.
- Agree the label standard before sharing the first report, so teams recognise their own spend.
Grafana remains a good place to put cost next to latency and error rate, because Prometheus already holds the metrics. A team that can see cost and performance on one screen makes better rightsizing decisions than one that sees only a monthly invoice. Our guide to cloud native observability tools covers that wider stack.
What has changed in Kubernetes cost tooling?
- Ownership. Kubecost is now part of IBM. OpenCost continues as a CNCF project.
- Scope. The OpenCost GitHub page now lists cloud costs, carbon costs for cloud resources, AI inference cost for vLLM-based deployments and external costs through plugins, not only cluster allocation.
- Agent access. According to that page, OpenCost includes an MCP server, disabled by default, that gives AI agents access to allocation, asset, cloud cost and efficiency data. Treat this as read access to financial data and govern it like any other agent connection.
- GPU and AI workloads. Allocation now covers GPU as well as CPU and memory, which matters as inference and training move onto shared clusters.
How should you govern Kubernetes cost, and when is a tool not enough?
A dashboard shows cost. It does not decide who may change a request, scale a node pool or approve a new GPU workload. Three controls turn visibility into governance.
- Ownership. Every namespace has a named team and a cost centre label.
- Budgets and review. Showback reports go to team leads monthly, with idle spend reviewed alongside request-versus-usage gaps. The FinOps method for this is covered in FinOps on Google Cloud and, for several providers, Multi-Cloud FinOps with FOCUS.
- Policy for automated actions. As AI agents begin to resize workloads or open cost tickets, the actions need approved limits and an audit trail. ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents, and AgentGRC keeps autonomous agent actions inside policy, with the audit trail risk teams need.
A cost tool is not enough when labels are missing, when shared platform cost has no agreed split, or when nobody owns the action after a report. Fix those first. AI workloads add a further cost line, covered in FinOps for AI engineering.
What is a sensible adoption sequence?
| Step | Action | Output |
|---|---|---|
| 1 | Install OpenCost or an IBM Kubecost edition on one cluster | Namespace-level spend |
| 2 | Standardise team, product and environment labels | Allocation by owner |
| 3 | Connect billing data and on-premises price sheets | Costs that match the invoice |
| 4 | Review request-versus-usage gaps and idle capacity | Rightsizing backlog |
| 5 | Publish showback, then decide on chargeback | Team accountability |
| 6 | Set policy for automated cost actions | Governed automation |
The trade-off to accept is effort against precision. Request-based allocation is simple and fair for scheduling, while usage-based allocation is closer to real consumption but noisier. Most teams show both and let the gap guide rightsizing.
To map one cost decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
FAQ
What is Kubernetes cost analysis?
It is the practice of splitting infrastructure spend by cluster, namespace, workload and team, so each owner can see and manage what they cause.
Is Kubecost still free?
According to IBM's Kubecost page, a Foundations edition is free for unlimited clusters up to 250 cores with 15-day retention. Paid editions add more. Confirm current terms on the IBM page.
Is OpenCost the same as Kubecost?
No. OpenCost is a vendor-neutral CNCF incubating project under Apache-2.0. Kubecost is a commercial product, now owned by IBM, that began as open source.
Does OpenCost need Prometheus?
Yes, its installation page says Prometheus is required for scraping metrics and storing data.
Where should a team start?
Start at namespace level on one cluster, agree labels, then connect billing data and review the gap between requests and usage.
Ready to put AI agents to work? See an ElixirClaw demo: the agentic OS to build, orchestrate and govern AI agents across your enterprise systems.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE