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.06k stars 113 forks source link

Wrong output with labels #115

Closed julietesnardo closed 6 months ago

julietesnardo commented 6 months ago

Hi there, I'm wondering if anyone else is having issues with gathering the correct info when passing in labels? I've been trying to use the --pod-labels flag, but the outcome just lists all the nodes in the cluster.

Forget-C commented 6 months ago

@julietesnardo default don't list pods , use the --pods

kube-capacity|main ⇒ ./main --pod-labels app=test  
NODE       CPU REQUESTS   CPU LIMITS   MEMORY REQUESTS   MEMORY LIMITS
minikube   0m (0%)        0m (0%)      0Mi (0%)          0Mi (0%)
kube-capacity|main ⇒ ./main --pod-labels app=test --pods
NODE       NAMESPACE   POD                     CPU REQUESTS   CPU LIMITS   MEMORY REQUESTS   MEMORY LIMITS

minikube   *           *                       0m (0%)        0m (0%)      0Mi (0%)          0Mi (0%)
minikube   default     test-5746d4c59f-mzsvl   0m (0%)        0m (0%)      0Mi (0%)          0Mi (0%)
julietesnardo commented 6 months ago

Thank you!