Skip to main content
The CostGraph Operator runs in your Kubernetes cluster and continuously reports its state to CostGraph. It deploys two components:
  • Resource exporter — watches every Kubernetes resource (workloads, nodes, namespaces, and more) and exports their definitions to CostGraph.
  • Metrics scraper — scrapes cluster, host, and container metrics and remote-writes them to CostGraph.
Together they collect:
  • Cluster inventory — the live manifests of all resources in the cluster.
  • Container metrics — per-container CPU and memory from cAdvisor.
  • Host metrics — node CPU, memory, disk, and network from node-exporter and the kubelet.
  • Kubernetes object metrics — pod, deployment, and node state from kube-state-metrics.
  • GPU metrics — optional, from the NVIDIA DCGM exporter.
On the CostGraph platform, this data powers:
  • Workload and namespace cost — spend attributed across pods, deployments, and namespaces.
  • Rightsizing recommendations — CPU and memory resize suggestions for your workloads.
  • Idle detection — workloads running consistently below their requests.
  • Cost anomalies — unusual spend or utilization changes surfaced automatically.

Prerequisites

Install

1

Add the Helm repository

helm repo add costgraph http://charts.costgraph.ai/
helm repo update
2

Install the operator

helm install costgraph-operator costgraph/costgraph-operator \
  --namespace costgraph \
  --create-namespace \
  --set global.clusterName=<your-cluster-name> \
  --set global.apiKey=<your-api-key>
For production, store the API key in a Secret and reference it with global.existingSecret instead of passing it inline — see Configuration.
3

Verify

kubectl get pods -n costgraph
Once all pods are Running, your cluster appears in the CostGraph platform.
Running GPU nodes? Enable the DCGM exporter for GPU metrics — see Configuration.
The chart ships with sensible defaults. To tune scheduling, metrics sources, or the bundled exporters, see the Configuration reference.