'Is there a way to break down costs in GKE Autopilot?
Can we see the CPU and memory usage by deployment or pod? Currently it's only for the whole cluster and if we are billed 10k$/month, we don't know which of the ~50 deployments need optimization the most.
I would expect to be able to use Kubernetes labels or annotations to achieve this.
If not possible with Autopilot, could we do it with the normal GKE or is there some other solution?
Solution 1:[1]
There is GKE usage metering which might solve your needs: https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-usage-metering
However, it seems like GKE usage metering today doesn't support autopilot.
Another thing you could start doing is to charge users for the amount of resource they're requesting by analyzing the pod resource requests and limits.
kubecost is another project that can help with analyzing cost: https://www.kubecost.com/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sam Stoelinga |