Skip to main content
10.08.2026

OpenCost AI Inference Costs for Kubernetes

head-image

AI platforms make cost debugging harder than normal service debugging. A GPU can be fully booked, mostly idle, or busy serving one expensive model while another team sees the bill. The OpenCost 1.121.0 announcement connects Kubernetes resource cost to inference metrics from vLLM and llm-d.

What Is OpenCost?

OpenCost is a CNCF incubating project for Kubernetes and cloud cost allocation. It already tracks CPU, memory, volumes, nodes, namespaces, controllers, pods, and GPU allocation.

The new inference work adds a missing layer for AI platforms: cost per model, cost per million tokens, input and output token costs, KV cache effects, and shared infrastructure attribution. That matters when platform teams decide whether to self-host a model, use a SaaS API, consolidate low-traffic models, or tune routing.

Key Signals For SRE Teams

  • Allocation-based model cost: the full cost of keeping a model available, including reserved GPU memory, active compute, and shared infrastructure.
  • Usage-based model cost: the cost of the work actually performed during active inference.
  • Cost per million tokens: a practical unit for comparing models, hardware shapes, and external API pricing.
  • KV cache-aware accounting: cache hits change input-token economics, so they need to be visible.
  • Prometheus and API access: cost signals can become dashboards, alerts, and automation inputs.

The important split is allocation versus usage. Usage-based cost can make self-hosting look cheap because it ignores idle capacity. Allocation-based cost shows what the platform really pays after warm model hosting, GPU reservation, and shared components are included.

Installation

OpenCost is installed through its Helm chart:

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

For inference cost tracking, confirm that your serving stack exposes the needed vLLM metrics and that OpenCost can read your cluster's Prometheus endpoint.

Usage In An AI Platform

A useful dashboard should separate three questions:

Which model costs the most to keep warm?
Which model costs the most per million tokens?
Which team or agent workload is driving the spend?

Do not mix those into one blended number. A model with low active compute cost can still be a bad deal if it sits loaded on an expensive GPU all day.

Operational Tips

Alert on fast changes in allocation-based cost, not only token volume. A routing change, replica increase, or model rollout can move spend before error rates change.

Tag inference workloads by team, product, environment, and model name. Without stable labels, cost data becomes anonymous telemetry.

Use allocation-based cost for build-versus-buy decisions. Use usage-based cost for performance tuning and hardware comparisons. That split keeps financial decisions honest.

Conclusion

OpenCost inference tracking gives SRE and platform teams a better control loop for AI infrastructure. It links Kubernetes spend to model behavior, token volume, utilization, and ownership.

If your team wants AI-assisted incident workflows with strong operational guardrails, Akmatori helps SRE teams detect, explain, and respond to production issues with agents built for real infrastructure. Akmatori runs on Gcore infrastructure for reliable global performance.

Automate incident response and prevent on-call burnout with AI-driven agents!