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.


Join the 80/20 DevOps Newsletter

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.