Skip to content

How It Works

ClusterCost runs entirely inside your cluster. It connects to the Kubernetes API to gather real-time data and calculates costs on the fly.

graph LR
K8s[Kubernetes API] -->|State & Metrics| Agent
Pricing[AWS Pricing] -->|Embedded Tables| Agent
Agent -->|Cost Metrics| Dashboard
Agent -->|Prometheus Metrics| Scrapers((Prometheus))
  1. Collection: The Agent connects to the Kubernetes API Server and Metrics API. It watches for Pods, Nodes, and Namespaces.
  2. Calculation: It correlates resource usage (CPU/Memory) with the node’s instance type and pricing data (embedded in the binary).
  3. Aggregation: Costs are aggregated by Namespace, Workload, and Label.
  4. Visualization: The Dashboard queries the Agent’s local API to display real-time cost breakdowns.
  • No Prometheus Required: The agent works standalone. If you have Prometheus, you can scrape it, but it’s not a requirement.
  • No Cloud Connection: Pricing data is generated offline and embedded. The agent does not call AWS APIs at runtime.