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

Allow custom table output #102

Open starlightromero opened 11 months ago

starlightromero commented 11 months ago

As a user, I would like to customize the table output. One specific use case is running the command kube-capacity -c to get the resources for all containers. This command produces a wide output. It would be helpful if I can omit, for example, node and namespace.

I propose a command such as:

kube-capacity -c --custom-columns POD,CONTAINER,CPU REQUESTS,CPU LIMITS,MEMORY REQUESTS,MEMORY LIMITS

With this command, the NODE and NAMESPACE columns from the command kube-capacity -c would not be displayed

almson commented 7 months ago

I second this. In particular, I'd like to examine and tune just memory requests vs usage. I'd also like to display additional columns like total capacity.