kubeswitch
kubeswitch copied to clipboard
Switch ns throws error stating kubeconfig file doesn't exist
I tried this wonderful tool. This has become everyday handy tool to switch between clusters/kubeconfigs.
But switching ns doesn't work properly
switch ns
Error: unable to list namespaces. The kubeconfig file "" does not exist
unable to list namespaces. The kubeconfig file "" does not exist%
Im facing the same issue
Sorry for the delay. Could you check if the fix included in this commit works for you?
You can use the from source installation method described here. Thanks a lot!
Still I get the same issue.
Always it expects this /Users/username/.kube/config
to be present. Then it works correctly.
If I delete the /Users/username/.kube/config
file it get this error
Assuming no switch-config file.
KUBECONFIG env set to valid kubeconfig + /Users/username/.kube/config
not present --> switch ns
works
KUBECONFIG env not set + /Users/username/.kube/config
not present --> does throw the above error.
-
switch
throws:Error: you need to point kubeswitch to a kubeconfig file
-
switch ns
throwsError: unable to list namespaces.
Can you check if you have a KUBECONFIG env variable set if the file /Users/username/.kube/config
is not present?