davidB / kubectl-view-allocations

kubectl plugin to list allocations (cpu, memory, gpu,... X utilization, requested, limit, allocatable,...)

Home Page:https://crates.io/crates/kubectl-view-allocations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

view-allocations crashing on certain clusters

wreed4 opened this issue · comments

We run teleport https://goteleport.com/ in front of our clusters, so this might be causing it. It uses impersonation under the hood. I'm able to use the plugin on clusters that do not have teleport in front of them. The error suggests I'm not logged into the cluster or don't have permissions, but I have system admin and other kubectl commands (and krews) work fine. This happens both when installing as a krew and when running the binary directly.

(ins)-> ./kubectl-view-allocations 
{"v":0,"name":"kubectl_view_allocations","msg":"failed with status 500 Internal Server Error","level":50,"hostname":"wil-76","pid":2966844,"time":"2022-05-20T13:58:45.122794844Z","target":"kube_client::client","line":547,"file":"/cargo/registry/src/github.com-1ecc6299db9ec823/kube-client-0.69.1/src/client/mod.rs"}
{"v":0,"name":"kubectl_view_allocations","msg":"failed \ncli: CliOpts { context: None, namespace: None, utilization: false, show_zero: false, resource_name: [], group_by: [resource, node, pod], output: table }\nerror: KubeError { context: \"list nodes\", source: Api(ErrorResponse { status: \"Failure\", message: \"[00] access denied\", reason: \"\", code: 403 }) }","level":50,"hostname":"wil-76","pid":2966844,"time":"2022-05-20T13:58:45.12287036Z","target":"kubectl_view_allocations","line":43,"file":"src/main.rs"}
(ins)-> k version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6", GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean", BuildDate:"2022-04-21T03:49:49Z", GoVersion:"go1.17.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.15-eks-0d102a7", GitCommit:"a8ff0230f2c155701a76c41fdcbddff180dc1833", GitTreeState:"clean", BuildDate:"2022-02-17T16:47:50Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.20) exceeds the supported minor version skew of +/-1
(ins)-> k auth can-i list nodes
Warning: resource 'nodes' is not namespace scoped
yes