robscott / kube-capacity

A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster
Apache License 2.0
2.09k stars 114 forks source link

Add option to only display nodes/pods that are above/over a specified resource utilization threshold #97

Open dpedu opened 1 year ago

dpedu commented 1 year ago

This is a suggestion for a feature to add to kube-capacity that I believe would be useful, at least for myself.

Add command line flags to only display nodes/pods that are above/over a specified resource utilization threshold.

Examples:

I think these filters would make it easier to spot nodes that have low or high utilization. Currently, the tool lists all nodes/pods in a list, which is not ideal as one needs to manually look through this list, which is difficult for large clusters. Myself, I deal with some clusters with 100+ nodes and manually looking through the list of all nodes inconvenient. Since I want and expect my nodes to have >80% utilization, having filters like these would allow folks to configure this tool to output only nodes of concern, which is a better user experience.