How Costory reads Kubernetes cost
Kubernetes cost lands in the same cost model as your other providers. You can split it by cluster, namespace, label and team.
EKS
- Connect AWS billing first (AWS Billing Setup).
- In AWS Billing preferences, turn on Split cost allocation data for Amazon EKS, and import the Kubernetes labels you want to allocate by (for example
team,app). - Costory’s CloudFormation and Terraform templates already include split cost allocation data in the CUR 2.0 export. If you created the export by hand, check that it’s included.
GKE
- Connect Google Cloud billing first (GCP Billing Setup), with the detailed usage cost export.
- In the GKE cluster settings, turn on GKE cost allocation, so namespace and label data lands in the billing export.
k8s_label_<label_name> (see GKE cost allocations). They show up directly in Costory Dimensions, with no extra setup.
AKS
- Connect Azure billing first (Azure Billing Setup).
- Check that the cluster is on the Standard or Premium tier, under an Enterprise Agreement or a Microsoft Customer Agreement. The Free tier does not support cost analysis.
- Enable the cost analysis add-on on each cluster, with the Azure CLI (
az aks update --enable-cost-analysis), in the Azure portal (Settings > Cost analysis) or with Terraform (cost_analysis_enabled = true). Azure does not inherit the setting from a subscription, so repeat it on every cluster.
label_* keys in the cost-analysis export.
For requirements and details, see AKS cost allocation.
Good to know
- Cluster cost is shared. A fair split by namespace needs usage metrics (CPU and memory requests or usage), not only node tags.
- To split a shared cluster by real usage, see EKS cost allocation. It covers reallocation with Datadog usage.
- To measure Kubernetes waste and reallocate it to teams, see Kubernetes cost visibility.
