Comments (6)
Hi, sorry I missed this being closed. Just tried it, works perfectly, thanks!
from kubeswitch.
Am I doing something wrong?
No, it is just not supported yet. But it does not sound very complicated.
I'll try to add it, but cannot give you a concrete timeline :)
from kubeswitch.
I'm a bit confused in that case. For kubectl
to work with multiple kubeconfig files I have to set the KUBECONFIG
environment variable using the colon separated list of config files, otherwise it doesn't see any config. However for kubeswitch
to work I have to unset the KUBECONFIG
variable, and instead set the wildcard in switch-config.yaml
. I don't understand how both kubectl
and kubeswitch
could both work if I want multiple config files.
from kubeswitch.
Currently kubeswitch
does not work with multiple paths in the KUBECONFIG
. It will always try to load whatever is configured in the environment variable and throws an error.
As soon as kubeswitch supports it the flow will look like this:
KUBECONFIG
env variable has multiple pathskubeswitch
displays contexts from multiple paths + what is configured in theswitch-config.yaml
- User selects a context
kubeswitch
creates a temporary kubeconfig file containing only your selected context.- the
KUBECONFIG
env variable is updated to point to the temporary kubeconfig. kubectl
works against one context in one kubeconfig file. If you want to switch contexts, you need to useswitch
again. You need to have both the kubeconfig files in theswitch-config.yaml
, otherwise you cannot select them as they are not in the KUBECONFIG env variable any more.
As an alternative: Do not set multiple paths in the KUBECONFIG env variable. Set multiple paths in the switch.config
file like shown in the docs.
Does that help?
from kubeswitch.
Yes that makes sense I think. Thanks for the feedback.
from kubeswitch.
I created this commit included in the release 0.4.8
so you can try it out.
If it does not work for you, feel free to open the issue again.
from kubeswitch.
Related Issues (20)
- Bad index file - timing issue HOT 1
- Homebrew linux install "switch command not found" HOT 2
- glibc version not found HOT 11
- Unable to fetch namespaces HOT 2
- Build C compiler errors when building from source on RHEL v8.9 HOT 1
- Can't seem to get namespace per shell HOT 1
- My kubeconfigs are nested in subdirs in a single filestore ie auth/kubeconfig which confuses showPrefix HOT 1
- kubectx-like completion HOT 4
- Kubeswitch does not handle proxys HOT 3
- Let's call it a day and find ourselves a new fork of this tool HOT 4
- switch ls --no-index does not persist the index
- Add Linux ARM binaries HOT 1
- garden integration broken HOT 2
- [Feature Request] Return Namespaces from Cache to STDOUT.
- [Enhancement] `switch namespace <namespace>` should set the namespace without refresh if it exists in cache. HOT 1
- compdef: command not found HOT 1
- Custom Store from CLI Command HOT 1
- Add support for namespaces in aliases HOT 2
- [Enhancement] Support AWS SSO with automatic authentication refresh for AWS IAM Identity Center HOT 1
- aws eks named profile with kubeswitch store errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubeswitch.