Skip to main content

Prerequisites

From CostGraph, one thing: a deployment API key, created in the dashboard under Settings → API Keys. It is the only credential you need. The image registry authenticates with the same key, and the chart wires that up for you. From your side:
  • Kubernetes and Helm 3+
  • Postgres 14+, with citext and pg_trgm
  • Redis
  • VictoriaMetrics
  • The URL your users will reach the dashboard on
pg_partman and pg_cron are not strictly required, but install them. Without pg_partman every row lands in one default partition and large tables degrade; without pg_cron partition maintenance is never scheduled, and inserts eventually fail.Managed Postgres (RDS, Cloud SQL) often ships neither. The install still succeeds and warns you.
Sign-in needs no configuration. Your users sign in with their CostGraph accounts; their cost data stays in your network.

Install

1

Add the Helm repository

2

Write a values file

my-values.yaml
appBaseURL must be the address people actually open in a browser, not an internal Service DNS name. It shapes the links in invitation email.
3

Install

A preflight check runs first and fails the install with the reason if the database cannot support the schema.

Evaluating without a database

To try it before standing up Postgres, Redis and VictoriaMetrics, replace those three blocks with bundled.enabled: true on each and the chart runs them in-cluster:
Evaluation only. Single replica, no backups, and the bundled Postgres image carries neither pg_partman nor pg_cron, so partition maintenance never runs. A database holding your cost history should outlive a Helm release.

Keeping credentials out of values

For production, put credentials in Secrets you manage and reference them with existingSecret rather than inline values, so nothing sensitive is written into Helm release history:
When you use controlPlane.existingSecret, create the image pull secret yourself as well and set imagePullSecrets:

Network access it needs

Outbound HTTPS (443) to these hosts: Nothing needs to reach the deployment from outside your network.

Connecting your spend

Installing the chart gives you CostGraph. It does not give it anything to report on yet. That comes from the same sources as hosted CostGraph: Connect whichever apply to you. Provider integrations need only a read-only credential and nothing deployed.

Pointing them at your install

Everything you deploy defaults to hosted CostGraph, so on a self-hosted install you redirect it at your own address.
Miss this and that cluster or machine reports to hosted CostGraph instead of to you.
For the operator, in every cluster you want costs for, including the one running CostGraph:
The agent and the API take the same treatment: give them your own address in place of api.costgraph.ai, and your deployment API key.

Pricing hardware that is not in a cloud

A resource in a public cloud is priced from that provider’s published rates, matched on its instance type and region. Hardware you own has no published rate, so you register what it costs you and tag the resources that bill at it. This applies whether you measure them with the operator or the agent. Register the rate once, then tag everything that bills at it:

Pricing IDs

Registering rates, the label spellings each platform accepts, and how a rate is inherited from a node to the volumes on it.
Labels are inherited: tagging a node prices the volumes attached to it, so you rarely need to label every object. A node is in no namespace, so labelling a namespace never changes a node’s own rate.

Operating

Resources are named <release>-costgraph-selfhosted. The examples below assume helm install costgraph ...; helm status costgraph prints them with your own release name filled in. Check health at any time. This reads the database and makes no outbound call:
If support asks for a diagnostic bundle. It contains no secrets and no cost data:

The one thing you must not delete

On first install the chart generates encryption keys into a Secret named <release>-costgraph-selfhosted-generated. Everything you have saved is tied to them. Helm keeps this Secret across upgrades and uninstalls, so normally you need do nothing. But it cannot be regenerated.
If that Secret is deleted, every API key your team issued stops working and every connected cloud account has to be reconnected, because the stored credentials can no longer be decrypted.Back it up alongside the database, and keep the two together. A database restored next to a different Secret is a database whose credentials cannot be read.

Upgrades

Upgrade in place. Pending migrations are applied on start:
Back the database up first. Migrations are not reversible, so rolling the release back does not roll the schema back. A failed upgrade recovers forwards, not by helm rollback.
The chart’s README carries the full recovery procedure for a failed upgrade:

Every setting

values.yaml documents each setting inline, next to the value it controls: