kubie icon indicating copy to clipboard operation
kubie copied to clipboard

Kubie doesn't honor the "namespace" setting inside Okteto's config file

Open ferdinandosimonetti opened this issue 3 years ago • 0 comments

Hello, I'm trying to use kubie to handle Okteto.com's kubeconfig along with the others, more standardized, cluster that I have to connect to. I'm using Okteto's developer plan here, so I'm constrained inside my own namespace without even "list namespaces" permissions for my user account.

After having downloaded the kubeconfig (I'm attaching it, of course edited, for first analysis), I've performed these operations:

ferdi@ferdi-U820:~$ cp Downloads/okteto-kube.config .kube/cloud_okteto_com.yml
ferdi@ferdi-U820:~$ kubie ctx
cloud_okteto_com
dev-nopci
dev-pci
ncp-dev
nts-dev
preprod-pci
preprod-shared
prod-dbe
prod-nopci-dr
prod-pci
prod-pci-dr
rancher-desktop
rancher-preprod-local
rancher-prod
rancher-prod-dr
rancher-prod-dr-local
rancher-prod-local
upgrade-dev
upgrade-dev-gepvlk8m01
ferdi@ferdi-U820:~$ kubie ctx cloud_okteto_com
[cloud_okteto_com|default] ferdi@ferdi-U820:~$ kubie ns ferdinandosimonetti
Error: Error calling kubectl: Error from server (Forbidden): namespaces is f
[okteto-kube.config.txt](https://github.com/sbstp/kubie/files/8130900/okteto-kube.config.txt)
orbidden: User "system:serviceaccount:okteto:47de2d6b-dea1-4e34-96c5-fafd238860d6" cannot list resource "namespaces" in API group "" at the cluster scope

Basically, I'm prevented to change the operational namespace to my assigned one, I was thinking that the "namespace" setting specified inside the downloaded kubeconfig will be honored.

[cloud_okteto_com|default] ferdi@ferdi-U820:~$ kubectl -n ferdinandosimonetti get all
No resources found in ferdinandosimonetti namespace.

I can, however, using the namespace "from the outside", thus renouncing to use the "kubie ns" functionality. okteto-kube.config.txt

ferdinandosimonetti avatar Feb 24 '22 08:02 ferdinandosimonetti