Hello Team,
I am new to K8S and Prometheus.
I have a question.
How can I get the cluster-wide capacity(Nodegroup) for both CPU and Memory resources instead of individual node capacity?
I found something similar for cluster-wide CPU allocation(requests) and real utilization(usage):
cluster:cpu_allocation:percent =
sum(kube_pod_container_resource_requests_cpu_cores) / sum(kube_node_status_capacity_cpu_cores) * 100
cluster:node_cpu_use:percent =
sum(rate(node_cpu{mode!="idle"}[5m])) / sum(machine_cpu_cores) * 100
Any help is highly appreciated.
Thanks,
Snehal