Kubernetes cluster cost visibility starts with the node cost on your cloud bill, distributed to namespaces by resource requests and measured usage. Whatever is left is idle capacity, and it belongs to the cluster rather than to a team. Costfluent does this distribution with an agent installed by Helm: cost appears by cluster and namespace, with idle as its own line, __idle__. Costfluent does not offer a per-pod, workload or container cost view.

Why the cloud bill has no namespaces

The cloud provider charges for instance hours, disks and load balancers. A node runs pods from several teams, and the bill has no namespace column. Providers offer their own splits, each with its own model:

MethodBasis of the splitUnused capacity
GKE cost allocation (Google Cloud)Resource requests onlySeparate namespaces kube:unallocated and kube:system-overhead; detailed BigQuery export only, no backfill
Split cost allocation data for Amazon EKS (AWS)The larger of request and usage, priced at amortised instance costRedistributed proportionally to pods; new rows per pod and hour in the CUR
On-premises, bare metalNo billing line per nodeYou have to price it yourself

Run more than one cloud, or your own hardware, and you get three numbers that do not compare. The Google side is covered in Google Cloud billing export.

The method: requests, usage, idle

Kubernetes schedules pods by their requests. The Kubernetes documentation states that the scheduler keeps the sum of requests below the node's capacity, and refuses a pod even when actual usage on the node is very low. What pods can use is the node's allocatable capacity, which is what remains after the reservations for system daemons. Three rules follow for any distribution:

  1. Requested capacity is taken. A namespace that requests a lot and uses little blocks capacity nobody else can schedule. That cost belongs to the namespace.
  2. Usage can exceed the request. A container may use more when the node has room; CPU limits are enforced by throttling, memory limits by OOM kills. Counting requests alone understates such namespaces.
  3. What is neither requested nor used is idle. It comes from node sizes, node-pool minimums and failover headroom. The platform owner decides on it, not a single team.

The node cost itself comes from the cloud bill. Whether it includes discounts and commitments depends on the cost view, billed or amortised; AWS, for example, prices pods at amortised instance cost. Distributing cost inside the cluster does not change the total; it only assigns it.

Node cost from the cloud bill, billed or amortisedSplit into CPU, memory and GPUDistributed to namespaces by requests and measured usageThe remainder, neither requested nor used: __idle__, owned by the platform
How a node's cost reaches namespaces: the bill prices the node, requests and usage distribute it, and what nobody requested or used stays with the cluster as idle

Which number answers which question

QuestionMeasureWho decides
Does a team request too much?Requests against usage per namespaceThe team
Is the cluster too big?__idle__ relative to node costPlatform
What does the cluster cost in total?Node cost from the cloud billFinance
Which namespace drives growth?Namespace cost month on monthTeam and platform

What the agent collects, and what it does not

The agent reads nodes, pods, namespaces and the resource metrics each kubelet serves. It sends node shape and identity, pod and container identity, resource requests and usage, and the pod labels you allow. It never sends container images, environment variables, secrets, config maps, logs or network traffic. The full list is in the chart documentation, which also names node labels and the three hourly-rate annotations. The agent reports every hour; reports it cannot deliver stay on its volume and are sent later.

These chart values control what leaves the cluster:

ValueDefaultWhen to change it
agent.allowedLabelsAll pod labelsWhen labels hold customer names, email addresses or internal identifiers
agent.allowedAnnotationsNoneOnly for annotations you actually report on
agent.collectNamespaceLabelsfalseWhen cost centre or team is kept as a namespace label
agent.secret.name, agent.secret.keyName not set; key tokenAlways: keep the token in a Secret, not in version-controlled values files

The agent reports with its cluster's own token. Add the cluster with Add cluster on the Clusters tab of the Kubernetes page, and Costfluent shows the cluster token once, with the install command that carries it. The token reports usage for that cluster and nothing else, and it works on every plan. Installation, once per cluster:

helm repo add costfluent https://costfluent.github.io/helm-charts
helm upgrade -n costfluent cfa costfluent/costfluent-k8s-agent --install --create-namespace \
  --version 0.2.2 --set agent.token=$COSTFLUENT_CLUSTER_TOKEN

How Costfluent calculates the cost

Costfluent splits each node's daily cost into CPU, memory and, on GPU nodes, GPU. Container resource requests and measured usage distribute that cost to namespaces; what remains unallocated appears as the namespace __idle__. A node's price comes from the first of these sources that has one:

  1. the billing rows of an AWS, Azure or Google Cloud connection in your organisation that bill that node,
  2. the node's own annotations,
  3. the hourly rates you set for the cluster.

A node with no price is left out and counted as unpriced on the cluster. Processing runs every night at 04:30 UTC for the previous day, so cost appears the morning after installation, while the Kubernetes page shows the latest report within minutes. In Cost Reports, group or filter by Cluster and Namespace; pod labels are available as tags named k8s:label:{key}.

YesNoYesNoYesNoNodeBilling rows of a cloud connection?Price from the billHourly-rate annotations on the node?Price from the annotationsHourly rates set for the cluster?Price from the cluster ratesUnpriced: left out and counted on the cluster
Where a node's price comes from: the first source that has one wins, and a node with none is counted as unpriced

Avoid double counting with the cloud bill

A cluster's cost is the cost of its nodes, which the cloud connection paying for them already reports. Costfluent does not count Kubernetes cost toward tracked spend. A cost report over a workspace holding both sources still shows the nodes twice: once as the cloud's instances, once distributed to namespaces. For a total, filter the report by provider to one side. Use the Kubernetes side for cost allocation to teams and the cloud side to match the invoice.

Common mistakes

  • Adding both views. The cluster total looks twice as large. Check every report that holds both sources for a provider filter.
  • Unpriced nodes. On-premises nodes, or nodes without a matching cloud connection, are missing from cost and the cluster shows Warning. Set hourly rates per vCPU, per GB of memory and per GPU, with their currency, on the cluster or as node annotations.
  • Reading __idle__ as a saving straight away. Some idle is deliberate headroom. Look at node-pool sizes and autoscaler minimums before deciding.
  • No usage on AKS. Kubelets there often serve certificates the agent cannot verify. The documentation gives agent.disableKubeTLSverify=true and agent.nodeAddressTypes=InternalIP.
  • Treating namespace cost as pod cost. Distribution stops at the namespace. Cost per customer needs its own allocation key; see cloud cost per customer.

Availability and next step

The Kubernetes agent works on every plan, Free included, within that plan's limits. Set-up details are on the Kubernetes integration page. Before the first report:

  1. Add the cluster in Costfluent and copy its cluster token, which is shown only once.
  2. Restrict agent.allowedLabels to the labels your reports need before installing.
  3. Decide each node's price source: cloud connection, annotation or cluster rates.
  4. Wait for the first nightly run and check the cluster status.
  5. Build reports by cluster and namespace, keep __idle__ as its own line, and give it an owner in the monthly cloud cost review.

Sources and method

Checked on 2026-10-10. Kubernetes, Resource management for pods and containers and Reserve compute resources for system daemons; Google Cloud, GKE cost allocation; AWS, Split cost allocation data and its worked example; Costfluent, the agent chart and the Kubernetes integration. The decision table and checklist are Costfluent recommendations. Distribution to namespaces is not evidence of per-pod cost.