Jesus Paz · 3 min read

How to Calculate the True Cost of a Kubernetes Cluster (Step-by-Step Guide)

Use repeatable formulas to translate AWS bills into per-cluster, per-node, and per-namespace costs with ClusterCost.

kubernetes finops aws

Getting a monthly AWS invoice that simply says “EC2 – $84,635.42” is useless when you are trying to decide whether to scale a cluster or sunset a namespace. This guide breaks the process into measurable steps so you can turn any AWS Cost and Usage Report (CUR) into a per-cluster ledger and plug it straight into ClusterCost.

1. Inventory every cluster component

List all cost drivers for the cluster:

  • Control plane: EKS charges $0.10/hour per cluster plus add-ons such as CloudWatch logging.
  • Worker capacity: EC2, Fargate, or mixed node groups. Include reserved instances, spot, and savings plans.
  • Storage: EBS volumes (gp3/gp2/io1), EFS CSI, FSx, snapshots.
  • Networking: NAT gateways, load balancers, PrivateLink, data transfer.
  • Observability + supporting services: CloudWatch, X-Ray, container registry, backup tooling.

Capturing the full ecosystem upfront keeps you from missing “hidden” spend like log ingestion or NAT sprawl.

2. Tag clusters aggressively (or let ClusterCost label them)

Add at least the following tags to every shared AWS resource:

ResourceRequired tagsOptional tags
EC2 nodescluster, node-group, environmentteam, customer
EBS volumescluster, workloadbackup-retention
Load balancerscluster, servicetraffic-profile

ClusterCost auto-detects many of these values using Kubernetes API metadata, but aligning AWS tags shortens reconciliation time.

3. Normalize node-level pricing

For each node group:

  1. Pull effective hourly rate from CUR or savings plan amortization tables. Include burst credits for T-family or GPU premiums.
  2. Convert to resource coefficients. Divide hourly cost by allocatable CPU cores and GiB of RAM to get $ per CPU-hour and $ per GiB-hour.
  3. Account for spot/on-demand mix by weighting each pool’s uptime.

Example:

Node group: m6i.4xlarge on-demand
Hourly cost (incl. EBS): $0.78
Allocatable CPU: 15 cores → $0.052/core-hour
Allocatable RAM: 60 GiB → $0.013/GiB-hour

ClusterCost performs this math continuously so pods scheduled on higher-cost nodes inherit the right price.

4. Allocate infrastructure add-ons

Some costs cannot be tied to individual nodes. Spread them using a policy:

  • Control plane & NAT gateways → even split across namespaces or weighted by traffic.
  • Load balancers → attribute to owning service using annotations.
  • Logging/metrics → allocate by log volume or request rate if known; otherwise, blend with node spend.

Document the policy so finance and engineering agree on the rules.

5. Map spend to namespaces and workloads

Once node and add-on costs are normalized:

  • Multiply each pod’s resource requests (or usage) by the per-unit price calculated earlier.
  • Add any namespace-specific add-ons (dedicated load balancer, EFS volume).
  • Summarize by namespace, deployment, and customer tag.

ClusterCost ships with both request-based and usage-based allocation views so platform teams can choose the model that best fits their governance.

6. Validate with a test namespace

Pick a namespace with stable workloads (e.g., payments-prod) and compare:

  1. Manual spreadsheet calculation (using the formulas above).
  2. ClusterCost output for the same time window.

If the numbers match within a few percent, automate the process for every namespace. If not, revisit node pricing assumptions or missing tags.

7. Automate continuous reporting

After validation, schedule:

  • Daily exports to finance or your data warehouse via the ClusterCost API.
  • Weekly cost reviews with engineering managers to spot anomalies.
  • Monthly forecasts that blend actuals with deployment plans.

Automation turns the cluster cost exercise from a painful monthly scramble into a reliable signal your entire org can trust.

TL;DR checklist

  • Tag clusters, node groups, volumes, and networking resources.
  • Convert node hourly rates into CPU/RAM coefficients.
  • Allocate shared services with documented policies.
  • Roll costs up to namespaces/pods using ClusterCost.
  • Validate against a known namespace before scaling the process.

Follow these steps once and you will finally know what each Kubernetes cluster costs—no more guessing from a giant AWS bill.***

Previous

The Complete Guide to Kubernetes Cost Allocation: Pods, Namespaces, and Services

You’ve reached the end—check the related reads below.

Related reading

Join 1,000+ FinOps and platform leaders

Get Kubernetes and ECS cost tactics delivered weekly.