Project Lightning Talk: OpenCost: Cost And Resource Management - Rajith Attapattu, Maintainer
About this talk
This talk introduces the OpenCost project, a vendor-neutral CNCF incubating initiative that provides a unified model for managing resource allocations and cost visibility in Kubernetes clusters. The speaker explains that OpenCost supports multi-cloud environments and offers a plugin architecture that enables users to create custom cost models, including integration with other platforms like DataDog and Snowflake. OpenCost uses Prometheus for monitoring but is exploring a Promless mode to address performance challenges in large clusters. The speaker emphasizes the importance of right-sizing workloads and clusters to manage costs effectively, highlighting how OpenCost allows users to gain insights into overhead, allocation, and resource usage costs. Additionally, the talk clarifies the evolution of OpenCost from KubeCost and discusses the project's goals in providing visibility and management tools for Kubernetes operations.
Full transcript
All right, pleasure to be here. All right, so I'm going to talk to you about the OpenCost project. How many of you have heard about it? Hooray, that's that's awesome. This time we have 3 days at the project pavilion. Just drop by. I can't remember the times off the top of my head, but we'd love for you to come by and and visit and ask any questions.
All right, I'm going to take you through three slides and I have a quick hands-on demo. And if I have enough time, I can show you around the the UI a little bit. All right. Okay, so what's OpenCost? It's a vendor-neutral CNCF incubating project. It provides a unified model for your allocations and assets. It gives you a way to you know, get visibility into your Kubernetes clusters,
right? Has multi-cloud support. If you're running on prem, you can give a custom pricing sheet. Has a pretty extensible architecture. There's a plugin architecture where you can build things like, you know, for example, someone built a DataDog plugin. There's a Snowflake plugin that's kind of making its way through the PRs. So you can build um cost models for other non-Kubernetes stuff and then kind of bring that
data into into OpenCost itself. Has a pretty flexible deployment model. It currently uses Prometheus, but obviously there are some performance challenges, especially when you have a lot of workloads in very large clusters. So the community is working on a Promless mode. Still in fairly alpha mode, but we encourage you to come and you know, try it out. Tomorrow I have a a deep dive into OpenCost, a
regular session where we're going to go deeper into the architecture and talk about um you know, Promless versus uh, know, uh, mode and some other innovative things that we're going to do in the project. All right. So, uh, why does it matter? Um, you know, we all, uh, adopted Kubernetes, which is why we're all here. Uh, when day two operations come, people want to know how to
keep their cost in check and more importantly, how do we get visibility into the efficiency of the clusters so we can right-size the clusters and the workloads. Oh, yeah, we do have Carpenter and things like that, but you'd be surprised to see how many clusters are grossly over provisioned, mostly because the workloads are not sort of right-sized. Um, with with OpenCost, you get visibility into the cost
makeup of your cluster. And very quickly, I'll kind of talk about the, sort of like, the fundamental model here. Inside your cluster, you have three zones. You overhead cost, which is where the control plane cost, any extra cost that you, you know, might think of running it. And then you have the allocation costs. Uh, these resource allocation costs are when you provision a cluster, when the node,
node, uh, nodes get provisioned, the cloud vendor starts billing, right? Uh, so those are your CPU, memory, GPU, disk, right? And then you have the resource usage cost. So, these are based on activity, right? So, when the pods serve traffic, there's, um, network cost. Three things there. Egress, cross-zone, cross-region. Uh, sometimes folks are not aware that within a cloud vendor, you know, you you hear about the
best practices for deploying Kubernetes, but, you know, the three, um, you know, the multi-zone architecture, but chatter between those zones, that's going to cost money. So, this, uh, you know, at least OpenCost has a way, um, we still don't have network cost within the open source versions, but the the data structures are there to kind of capture this network traffic. Now, the other model that I want
to quickly highlight is the container. Same thing, it's the smallest unit where you have the allocation costs and the resource usage costs. So, if there's two things that you want to take away from this is to think about this and that helps you to right-size your workloads and clusters. If you right-size your containers, that will reduce the um the record resource request from your cluster, and then
based on that, using auto scaling and carpenter, your clusters will start to right-size. Or, if you're not doing anything like carpenter or um auto scaling, at the least you get the visibility to look at your idle workload idle capacity, and then right-size the cluster manually. And there's another advantage of this, which is um you get to calculate unit economics, um and this is useful in chargeback, especially
larger organizations wants to uh do internal chargeback, you can build a basis for that using um OpenCost. Final slide before I move to the demo. Um this is the number one question that people ask me, "Hey, what's the difference between KubeCost and OpenCost?" KubeCost donated um to CNCF a couple of years ago, that became OpenCost, and then that's the vendor neutral um you know, implementation that we
have, and then we have vendors like KubeCost and Rendoli, which I represent providing, you know, downstream value adds based on OpenCost. So, that's the difference. All right. Um let me do a demo. So, just like everything else, there's a MCP server, and um this is actually built by a um an intern using the LSF mentorship. So, anyone who's interested in cool projects like that, reach out to
us. Um you know, I'm going to just ask a simple question like what am I the top five expensive name spaces if I can type fast. Is that my last one that I running out of time? You have about 30 seconds. >> Okay. Well, hopefully this does it. So as you can see I have um you know it's >> There you go. It's just um calculating stuff
so hopefully I could get a an answer here. On not. Let's see. If not I actually just ran it a few minutes ago. Um it'll it'll you know I asked the question my top five deployments with CPU and memory and gave me this. Um it's backed by an oh um nice set of APIs. This is what the the MCP is based off. Oh, here we go. There
you go. Um there's a UI as well. Um not the greatest UI but uh you know it is an open source project. So if you go to open cost.io and click on demo you could get to see this. Um you know don't get discouraged by the the UI. what's important with open cost is the model, the APIs, and then obviously things like the MCP server. Thank you
very much to all of you. >> Awesome. Thank you. Thank you. Mhm.
More from this event
See all 436 talks →
Best of KubeCon + CloudNativeCon Amsterdam 2026
2:17
The Quiet Work of Forever: Sustaining Open Source Communities - O. Hope Amaechi-Okorie, JSON Schema
26:24
Evolving KServe: The Unified Model Inference Platform for Both Predictive and... F. Spolti & J. Lee
32:40
Preventing S3 Cost Storms: Applying Cortex’s Efficiency Lessons to I/O-Heav... A. Fishman-Lichterman
5:32