Kubernetes

Kubernetes cluster costs by namespace, beside your cloud bill

Data and infrastructure Connects with Helm chart

A small agent, installed with Helm, reads resource usage inside your cluster and reports it to Costfluent every hour. Each node's cost is distributed across namespaces, the idle remainder is shown as such, and the cluster appears beside your cloud billing sources.

Permanent Free plan with no time limit

How you connect

One cluster, one token, one Helm install

A token for each cluster

Add the cluster on the Kubernetes page and Costfluent shows its token once. The token reports usage for that cluster and nothing else, so a leaked one cannot post for another cluster or read any data, and it needs no particular plan.

Helm, with the token

Install the chart with the cluster token. The agent learns its cluster from the token, and the first report reaches the Kubernetes page within minutes.

Enable it where it belongs

Enable the cluster in the workspaces that should see its cost, as with any other data source. Install one agent per cluster.

The token stays in a Kubernetes Secret

Point the chart at an existing Kubernetes Secret instead of writing the token into a values file under source control. Uploads use outbound HTTPS to Costfluent's API, directly or through a proxy.

Kubernetes cost by namespace: a daily stacked bar chart of one cluster's cost, split into its namespaces and idle capacity, with the previous period as a dotted line.
What the agent's reports become: cluster cost by namespace. Demo data from a sample organization.

What is read

Usage and identity, never workload content

Nodes, pods and volumes

The agent reads nodes, pods, persistent volumes and storage classes, the replica sets and jobs that own pods, the resource metrics each kubelet serves, and, only when you turn on their labels, namespaces and persistent volume claims. It reads kubelet metrics with a short-lived token of a second service account that can read nothing else, and may create a token only for that account. It sends node shape, identity and labels, pod and container identity, resource requests and usage, and each volume's size, class, driver and claim, with the disk ID of an AWS, Azure or Google Cloud disk.

The labels you allow

Pod labels are sent as you allow them, all by default or only those you name, and appear in cost reports as tags. Namespace labels, volume claim labels and pod annotations are off until you turn them on.

Not images, secrets or logs

The agent never sends container images, environment variables, secrets, config maps, logs or network traffic. Reports it cannot deliver wait on its volume and are sent once Costfluent is reachable again.

What you do with it

Kubernetes namespaces in team reports and showback

Kubernetes namespaces mapped to teams

Rules assign each namespace to a segment, and a virtual tag can turn the labels that name a team into one value, so a saved report shows each team what its namespaces cost.

Kubernetes cost shown to the teams that run it

Group a saved report by segment to show each team its share of the cluster, with idle cost in a namespace of its own and the cost no rule claims on one unallocated line.

Kubernetes clusters in cost reports

Group a report by cluster, namespace or label to see where node cost goes, idle cost included, and save the view beside your cloud reports.

Cost

Distributed to namespaces, counted once

  • Each node's daily cost is split into CPU, memory and, on GPU nodes, GPU, and distributed to namespaces from container requests and measured usage. What no namespace claims is idle cost, shown as a namespace of its own. Cost goes to namespaces, not to individual pods, workloads or containers.
  • A node is priced from the first of three sources: the billing rows of the cloud connection that pays for it, its own rate annotations, or the rates you set for the cluster, for on-premises nodes too. A node none of them prices is counted as unpriced.
  • A cluster's nodes are already on the bill of the cloud connection that pays for them, so a total over both sources counts them once. The cluster's rows appear when a report asks for Kubernetes by provider, cluster, namespace or label, and clusters are processed once a night.
  • Uninstall the chart and the cluster turns stale while its past cost stays in reports; delete the cluster to remove it and the cost allocated to its namespaces, which cannot be undone, and its tokens stop working with it.

Related pages

See your Kubernetes costs by namespace

Create a Free workspace and install the agent with Helm when you are ready.

Permanent Free plan with no time limit

We value your privacy

We use essential storage to operate the site and, only if you allow it, Google Analytics to understand how it is used. Read more in our Privacy policy.

Cookie preferences

Essential cookies Always on

Required for the website to function properly. These cannot be disabled.

Google Analytics

Records page views and four named actions: sign-up and demo clicks, contact form submissions and lead requests. Google's script and its _ga cookies load only after you allow them. We do not send account, tenant, form, or resource identifiers.