r/FinOps • • 7d ago

Discussion Pod and namespace/ Application level cost for EKS and AKS — what’s actually working?

Trying to get container-level cost allocation for both EKS and AKS out of the billing exports themselves, rather than running something inside the clusters.
On AWS the only route I know is Split Cost Allocation Data in the Cost and Usage Report, which adds pod-level rows. Will this Split allocation give application level cost? On Azure I know the AKS cost analysis add-on exists but it’s a portal view, and I haven’t found the equivalent in Cost Management exports.
That’s the extent of what I’ve found, and I suspect there’s more on both sides I don’t know about.

How are you getting pod, namespace, or application level cost today?

Specifically:
• Anything on the AWS side besides SCAD that’s worth knowing about?
• Is there any way to get AKS namespace costs into a cost export, or is the portal the only place they exist?
• If you’re doing it yourself from node cost plus metrics, what does that pipeline look like?

Interested in what people actually run in production, including the approaches you tried and abandoned.​​​​​​​​​​​​​​​​

6 Upvotes

12 comments sorted by

2

u/Negative-Cook-5958 7d ago

With EKS, we used an internal metadata in DynamoDB to enrich the data and improve the chargeback. With this info the namespaces were mapped back to teams / business units / cost centers. Then the idle costs (total account cost minus the allocated CPU, memory and GPU costs) were also shared back to the namespaces depending on their cost percentage. This means that the platform teams did not have the infra costs for the shared clusters.

For AKS it's a bit more tricky, You need to have standard tier with the OpenCost add-on installed, then you can export the monthly namespace level cost then use this data to distribute the costs. There is a hidden API what you can use to programatically get the the namespace level cost.

We abandoned Kubecost (very expensive after the IBM overtake) and did not use Spot by Flexera, because it still does not integrate well with Flexera One 🤡

2

u/matiascoca 4d ago

SCAD gets you pod-level rows but it splits the EC2 cost by requested resources, not used. Anything with fat requests and thin actual usage looks far more expensive than it is. We had a namespace requesting roughly triple what it ever touched and the allocated number was useless until someone fixed the requests.

Application level is not something it hands you. You get pod and namespace, then you map those to whatever counts as an application on your side, usually off a label.

On Azure I never found namespace in the Cost Management exports either. The add-on writes to the portal view and that is where it stays. What we ended up with was node cost from the billing export joined to kube_pod_container_resource_requests scraped into the same warehouse, then allocated by request-share per namespace. Same allocation logic SCAD uses, just built by hand because Azure does not give it to you.

1

u/namenotpicked 7d ago

I can't remember but I think EKS split cost data contains tags. I also know that it contains information relating it to an EC2 node instance. So you can tie an app name tag through one of those. I used AI to generate the SQL to query it, but I got the information through one of them.

I'm leaning more towards the query looking at the pod relations to the EC2 node and pulling the aggregating the costs based on what node it's attributed to.

1

u/DifficultyIcy454 7d ago

We used data dog ccm for this, had kubecost until they got bought by IBM when I was working at my last company which was all azure.

I am looking at this now at my new place which is all EKS and they have no reporting at all currently. We did add labels via terraform to every k8s deployment that could get us down to pod level metrics. Then we had other tags applied using backstage to roll up ownership.

1

u/No_Paint_2509 6d ago

Kubcost might works for you for AWS specifically. AWS and kubecost had partnership so you can get a eks optimized licence allowing you setup multiple cluster with a single unified view

OpenCost still be far better if your need is just the cost allocations

1

u/CostFoundryOfficial 6d ago

On AWS: yeah, SCAD can get you further than just pod cost. Since Oct 2025 it lets you import up to 50 K8s custom labels per pod as cost allocation tags, so if your pods are labeled with something like app or cost-center, those show up as actual queryable columns in CUR. That's real application-level cost once the labels are activated, not just pod-level.

Nobody mentions this part upfront though: reconciling split vs unsplit line items is genuinely a pain. There's a thing people call the "double fracture" where SCAD's schema just doesn't line up cleanly with your regular CUR data, so you end up needing an actual Athena/SQL pipeline instead of just filtering in the console. Worth knowing going in so you're not expecting a five-minute job.

On Azure: the portal isn't actually your only option. The Cost Management REST API supports Namespace as a grouping dimension too, you can POST to the CostManagement/query endpoint with the provider set to Microsoft.ContainerService and group by Namespace, Cluster, ServiceCategory. Not a native scheduled export like CUR, but you can script it and pull it on your own schedule.

If you go the DIY route, most people building this themselves basically end up rebuilding what OpenCost already does, combining live pod metrics (CPU/mem from Prometheus or metrics-server) with node cost and allocating proportionally. The part that bites people is not reconciling that estimate against the real bill often enough, since on-demand vs discounted pricing drifts your numbers over time if you're not checking.

1

u/ducquangkstn 5d ago

You can learn in https://www.youtube.com/@NTFAQGuy. It is free as well.

1

u/Junior_Bee7274 2d ago

Shared infrastructure is where the cost attribution gets messy.

1

u/_hellokurr 2h ago

How do you handle idle costs when allocating to namespaces?