Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context switch is not working - possible clash with same context name value #428

Open
vinibali opened this issue Aug 29, 2024 · 1 comment

Comments

@vinibali
Copy link

vinibali commented Aug 29, 2024

Hi!
I have some kubeconfigs which has the same context name inside. Even kubectl is not able identify both if these are listed in the KUBECONFIG env variable, like

KUBECONFIG=/home/user/.kube/cluster1.conf:/home/user/.kube/cluster2.conf

Is there some other way to identify the kubeconfigs with the context-cluster key?
Unfortunately I couldn't rename the context, because that breaks the functionality of the config.
I experience pretty much the same with kubeswitch:
danielfoehrKn/kubeswitch#137

@ahmetb
Copy link
Owner

ahmetb commented Aug 29, 2024

I'm afraid this is by design in kubectl and I agree with the design. Context name should not be the same across multiple files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants