Live data from Hacker News

Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

headlamp.dev

11–20 of 20 posts

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#11

Is there a way to allocate cost to every pod on a node when node cost is given without break down by resource type and pod resources are not in same ratio as node resources? Lets say node has 8 CPUs and 32 GB RAM (1:4 ratio). If every pod uses same ratio for its CPU:MEM then math is simple: node cost is split across all pods proportional to their resource allocation. How to make fair calculation if pod resource ratio…

I believe for AWS, they use these ratios: https://github.com/opencost/opencost/blob/c2de805f66d0ba0e53...

So in your example, 6 CPU + 16GiB is roughly 2x more than 2 CPU and 16GiB, so if that node cost say $6/hr, you'd expect it to be allocated $2 to the first and $4 to the second.

They have these weights for various clouds here: https://github.com/opencost/opencost/tree/c2de805f66d0ba0e53...

I'm sure someone will correct me if I'm wrong here, I'm not actually familiar with opencost, don't trust what I'm saying.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#12
post #4

So is Headlamp the state of the art in Kubernetes cluster management ever since Mirantis first enshittified Lens and then tucked away its sources?

I didn't try Headlamp, but I moved to AptKube from Lens and been happy since then. It might not be a best in class, but it is snappy and doesn't require any cloud accounts.

Is AptKube free? Their website makes it appears it's a paid subscription regardless if it's personal use or not.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#13
post #4

So is Headlamp the state of the art in Kubernetes cluster management ever since Mirantis first enshittified Lens and then tucked away its sources?

We, the Headlamp project, don't make any claims about being state-of-the-art as that's hard to define. But we do think Headlamp ranks high among having the best user experience and believe the fact that we're a 100% open-source project is a huge plus compared to some other projects in the space.

I think one area that we are rather different than other projects is that Headlamp is not only focused on end-users but also for teams looking to build their own Kubernetes UX by leveraging the Headlamp plugin system. Our thinking is that this will foster broader community participation and make Headlamp the most viable project in the space.

If you find that there is anything missing please file an issue and we'll consider it: https://github.com/headlamp-k8s/headlamp/issues/new

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#14
post #13
post #4

So is Headlamp the state of the art in Kubernetes cluster management ever since Mirantis first enshittified Lens and then tucked away its sources?

We, the Headlamp project, don't make any claims about being state-of-the-art as that's hard to define. But we do think Headlamp ranks high among having the best user experience and believe the fact that we're a 100% open-source project is a huge plus compared to some other projects in the space. I think one area that we are rather different than other projects is that Headlamp is not only focused on end-users but als…

Thanks - I'll seriously have to give Headlamp a go. I'm still using an old build of OpenLens but that's not gonna keep working forever.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#15

Is there a way to allocate cost to every pod on a node when node cost is given without break down by resource type and pod resources are not in same ratio as node resources? Lets say node has 8 CPUs and 32 GB RAM (1:4 ratio). If every pod uses same ratio for its CPU:MEM then math is simple: node cost is split across all pods proportional to their resource allocation. How to make fair calculation if pod resource ratio…

would like to know if someone's got a more objective approach; what we currently do is just a maxOf; take CostPerGB (memory) and CostPerCore (cpu); and costPerPod = max(pod.requests.cpu * CostPerCore, pod.requests.memory * CostPerGB) at an overall basis, this was ~20% off to actuals when we'd checked this last, so we clearly call out that the costs are "indicative" and not exact.

I thought about it, but then 2 pods each almost maxing out one dimension, for isntance 7.5 CPU 0.5 GB and 0.5 CPU and 31.5 GB will account together for more than node cost.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#16
post #7
post #4

So is Headlamp the state of the art in Kubernetes cluster management ever since Mirantis first enshittified Lens and then tucked away its sources?

I really like k9s. It’s plugin model is super easy to work with, if a bit constrained, as well.

I'm usually a fan of TUIs and think they can be incredibly powerful, but with k9s I couldn't feel comfortable in the day I spent trying it out. I think the problem is that I'm not intimately familiar with kubernetes, being more on the dev rather than ops side, and all that power of the TUI comes at the cost of some discoverability which I desperately need as I fuck around and find out.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#17

Is there a way to allocate cost to every pod on a node when node cost is given without break down by resource type and pod resources are not in same ratio as node resources? Lets say node has 8 CPUs and 32 GB RAM (1:4 ratio). If every pod uses same ratio for its CPU:MEM then math is simple: node cost is split across all pods proportional to their resource allocation. How to make fair calculation if pod resource ratio…

Red Hat Insights Cost Management does cost calculation and it calculates exactly how much each pod is costing, no matter what ratios, or node sizes, or discounts you may have.

It looks at what nodes are running on each cluster, how much each node is costing (it reads the actual cost from your cloud bill, including any discounts you may have), then it looks on which node(s) each pod is running, and then it calculates how much each pod on each node is costing.

https://docs.redhat.com/en/documentation/cost_management_ser...

It's free for Red Hat customers, both for cloud costing (AWS, Azure, GCP, OCI) and OpenShift costing. No support for EKS, AKS or other third-party Kubernetes, though.

https://access.redhat.com/products/red-hat-cost-management

https://console.redhat.com/openshift/cost-management/

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#18
post #16
post #7

Earlier quoted context omitted.

I really like k9s. It’s plugin model is super easy to work with, if a bit constrained, as well.

I'm usually a fan of TUIs and think they can be incredibly powerful, but with k9s I couldn't feel comfortable in the day I spent trying it out. I think the problem is that I'm not intimately familiar with kubernetes, being more on the dev rather than ops side, and all that power of the TUI comes at the cost of some discoverability which I desperately need as I fuck around and find out.

Yeah that’s a fair point.

I am a dev as well but I have been working with kubernetes a long time so I generally know what I need to be looking at.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#19

Earlier quoted context omitted.

I didn't try Headlamp, but I moved to AptKube from Lens and been happy since then. It might not be a best in class, but it is snappy and doesn't require any cloud accounts.

Is AptKube free? Their website makes it appears it's a paid subscription regardless if it's personal use or not.

There is no free version and comparing to something like Jetbrains IDEs price is a bit high for such a small tool. It is made by a single dev in a market where not that many paying companies, so higher price is understandable.

Re: Kubernetes Cost Management with the New OpenCost Plugin for Headlamp

#20

Is there a way to allocate cost to every pod on a node when node cost is given without break down by resource type and pod resources are not in same ratio as node resources? Lets say node has 8 CPUs and 32 GB RAM (1:4 ratio). If every pod uses same ratio for its CPU:MEM then math is simple: node cost is split across all pods proportional to their resource allocation. How to make fair calculation if pod resource ratio…

Red Hat Insights Cost Management does cost calculation and it calculates exactly how much each pod is costing, no matter what ratios, or node sizes, or discounts you may have. It looks at what nodes are running on each cluster, how much each node is costing (it reads the actual cost from your cloud bill, including any discounts you may have), then it looks on which node(s) each pod is running, and then it calculates…

> then it calculates how much each pod on each node is costing.

How _exactly_ do they do it? Whats the math?

Post reply on HN