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?
CodePudding user response:
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