Breaking down EKS costs with Kubecost & Opencost

I recently needed to break down our shared EKS (Kubernetes) cluster costs by product/team.

You can tag AWS resources using the built-in AWS tags and use the AWS Cost Explorer tool.

However, for shared compute resources, like EKS, it’s more difficult to get this cost breakdown. The challenge comes from having EKS nodes running multiple teams’ workloads on it. How do you attribute who owns what percentage of the node?

You might think you can use Kubernetes labels and annotations, but those don’t propagate to EC2 tags.

That’s where Kubecost and Opencost come in.

These tools are installed on your Kubernetes cluster and will analyze and give you a breakdown of costs by namespace, product, service, etc. as a percentage of the cost of the node.

I’ll go into the differences between the two tomorrow.


Master GitHub Actions with a Senior Infrastructure Engineer

As a senior staff infrastructure engineer, I share exclusive, behind-the-scenes insights that you won't find anywhere else. Get the strategies and techniques I've used to save companies $500k in CI costs and transform teams with GitOps best practices—delivered straight to your inbox.

Not sure yet? Check out the archive.

Unsubscribe at any time.