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

kube-capacity: command not found #96

Open eliassal opened 1 year ago

eliassal commented 1 year ago

Hi I setup this plugin followed instructions, when I issue

kubectl resource-capacity

I get an output as follows

NODE               CPU REQUESTS   CPU LIMITS   MEMORY REQUESTS   MEMORY LIMITS
*                  1700m (34%)    0m (0%)      330Mi (1%)        340Mi (1%)
kubernetes         250m (12%)     0m (0%)      0Mi (0%)          0Mi (0%)
kubernetes-node2   350m (35%)     0m (0%)      90Mi (1%)         0Mi (0%)
kubernetes2        1100m (55%)    0m (0%)      240Mi (4%)        340Mi (5%)

However, whatever commands I use I get errors as follows

kubectl resource-capacity ‐‐sort cpu.limit Error: unknown command "‐‐sort" for "kube-capacity"

kubectl resource-capacity ‐‐sort cpu.util --util Error: unknown command "‐‐sort" for "kube-capacity"

kube-capacity kube-capacity: command not found

Is there any config to add or update following setup? Than ks

VishnAndr commented 1 year ago

Double hyphens in front of the sort key are not actualy hyphens in you examples. They should be 2D 2D in hex. But in your command they are actually E2 80 90 E2 80 90 in hex. Try to copy your command and retype double hyphen manually. Happened with me when I copied command examples from some websites.