K9s: Running k9s in a pod, and using Kubernetes SA roles for authorisation, does not allow you to change namespace.

Created on 18 Aug 2020  路  3Comments  路  Source: derailed/k9s

Describe the bug
You are stuck to the default namespace if you try to use k9s without a context and rely on RBAC roles on the pod for authorisation.
This means if you do :namespace and chose another namespace, you are forced back to the default one.
However, if you type the shortcut 0, to swap to all namespaces, you can do so. You just cant if you do :namespace -> all. You also cant do po kube-system. However, as mentioned, I can see them fine in the 0 shortcut.
If you also run k9s with k9s -n kube-system it will also redirect you back to the default namespace.

To Reproduce
Deploy quay.io/derailed/k9s:v0.21.6 to kubernetes and create RBAC roles to restrict it.
Then open k9s after accessing the shell, and try to change namespace, you are forced to stay in default namespace.

Expected behavior
You can change namespace.

Versions (please complete the following information):

  • OS: Linux, in a pod, alpine (see quay.io/derailed/k9s)
  • K9s: v0.21.6
  • K8s: v1.17.9-eks-4c6976

Most helpful comment

Oh wow! Thank you so much! That worked perfectly!! :1st_place_medal:

All 3 comments

Oh wow! Thank you so much! That worked perfectly!! :1st_place_medal:

I know I know, i'm a true hero today, saved you again! And you're welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stk0vrfl0w picture stk0vrfl0w  路  3Comments

RothAndrew picture RothAndrew  路  3Comments

ChrisCooney picture ChrisCooney  路  3Comments

steffen-geissinger-by picture steffen-geissinger-by  路  3Comments

binarycoded picture binarycoded  路  3Comments