We recently started to use ‘local’ (to the git repos) kubeconfig files, instead of the ‘global’ one under the user home directory.
One surprise is that whereas this works fine:
$ k --kubeconfig ./kubeconfig-admin config get-contexts ...
…this does not:
$ k --kubeconfig ./kubeconfig-admin --context dev get ns Error from server (Forbidden): namespaces is forbidden: User "notification-admin" cannot list resource "namespaces" in API group "" at the cluster scope
Is this intentional? What is the rationale?
There was no such restriction with the global kube configuration.
Kubernetes version: v1.25.12
Cloud being used: eks
Host OS: Ubuntu 22.04
CNI and version:
CRI and version: