I work with a cluster that uses RBAC to limit non-administrative users to specific namespaces and as such I don't have permission to list all of the available namespaces. I was hoping that the -n option might allow me to use k9s but even with this option I'm getting the following error on start:
> ./k9s -n my-namespace
panic: namespaces is forbidden: User "[email protected]" cannot list resource "namespaces" in API group "" at the cluster scope
goroutine 1 [running]:
github.com/derailed/k9s/views.mustK8s()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/views/app.go:119 +0xc2
github.com/derailed/k9s/views.(*appView).Init(0xc0000ffd40, 0x1407c74, 0x5, 0x2, 0x7fffbfcb96f7, 0x6)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/views/app.go:74 +0xb0
github.com/derailed/k9s/cmd.run(0x1dfb940, 0xc00017b200, 0x0, 0x2)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:109 +0xfd
github.com/spf13/cobra.(*Command).execute(0x1dfb940, 0xc0000380a0, 0x2, 0x2, 0x1dfb940, 0xc0000380a0)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x1dfb940, 0xc00000c788, 0xc0000b3f78, 0xc0000b3f88)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x1dfb940, 0xc0000001a4, 0xc00000c788)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:800 +0x2b
github.com/derailed/k9s/cmd.Execute()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:91 +0x2d
main.main()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/main.go:22 +0x20
I think the issue here is upon loading, K9s tries to load the namespaces. Could it be your user does not have access to list namespaces. This is a must for k9s to load up at this time.
Please try 0.1.3 and see if we can get pass it. If not please reopen. Tx!
No joy unfotunately, I get the same error. My user doesn't have access to list namespaces (it's a multi-tenant cluster and the people running it don't want tenants to be able to discover each others' namespaces).
Same problem here
@GJKrupa The issue is not solved, right? Can you reopen the issue?
@GJKrupa The issue is not solved, right? Can you reopen the issue?
Last time I tried it, it was working perfectly as long as I had a default namespace set up in my k8s config.