Cluster Capacity (Nodegroup) for CPU and Memory resources

24 views
Skip to first unread message

Snehal Yeole

unread,
Oct 15, 2020, 5:52:56 PM10/15/20
to Prometheus Users
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

Snehal Yeole

unread,
Oct 16, 2020, 2:44:13 PM10/16/20
to Prometheus Users
Hi guys,

It will be great if someone can help me on the above question.

Appreciate your assistance, thanks.

Reply all
Reply to author
Forward
0 new messages