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.
The Pipeline
Section titled “The Pipeline”graph LR K8s[Kubernetes API] -->|State & Metrics| Agent Pricing[AWS Pricing] -->|Embedded Tables| Agent Agent -->|Cost Metrics| Dashboard Agent -->|Prometheus Metrics| Scrapers((Prometheus))- Collection: The Agent connects to the Kubernetes API Server and Metrics API. It watches for Pods, Nodes, and Namespaces.
- Calculation: It correlates resource usage (CPU/Memory) with the node’s instance type and pricing data (embedded in the binary).
- Aggregation: Costs are aggregated by Namespace, Workload, and Label.
- Visualization: The Dashboard queries the Agent’s local API to display real-time cost breakdowns.
No External Dependencies
Section titled “No External Dependencies”- 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.