Forum Topic

Thanks for your participation and contribution.


Back to Kubernetes

POD Count by Node

Post a reply
249 views
i90runner1
i90runner1

POD Count by Node

$ kubectl get po -o json --all-namespaces | jq '.items | group_by(.spec.nodeName) | map({"nodeName": .[0].spec.nodeName, "count": length}) | sort_by(.count)'

[ { "nodeName": "aks-vmss000004", "count": 7 }, { "nodeName": "aks-vmss000005", "count": 7 }, { "nodeName": "aks-vmss000003", "count": 41 }, { "nodeName": "aks-vmss000000", "count": 42 }, { "nodeName": "aks-vmss000001", "count": 44 }, { "nodeName": "aks-proddefault-19048966-vmss000002", "count": 44 } ]

1-1 of 1

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.