Reputation: 23
In the Rancher I can see the amount of pods I have in the cluster and the total amount I can have. How can I get this maximum amount of pods that my cluster is able to have with prometheus?
Upvotes: 2
Views: 2080
Reputation: 59986
You can use visualise based on these two queries
Total allocable pods:
sum(kube_node_status_allocatable {resource="pods"})
you can also cross-verify the result
capacity=$(k get node $(k get node | awk '{if (NR==2) print $1}') -ojsonpath='{.status.capacity.pods}{"\n"}')
$capacity*number-of-nodes
Total running pods:
sum(kube_pod_status_ready)
cross verification
k get pods -A | wc
So you can visualise this in Grafana
Upvotes: 1