harbur / kubernetic

Kubernetic - Supercharge your Kubernetes clusters
https://kubernetic.com
276 stars 26 forks source link

Switching between contexts change the actual current-context in config #148

Open ptuchik opened 4 years ago

ptuchik commented 4 years ago

Hello,

Is it possible to create some kind of setting in preferences, so when it is turned on, switching between contexts in Kubernetic will change the current-context in .kube/config file also?

Thank you.

dkapanidis commented 4 years ago

Hi,

in previous versions that was the default workflow, but in order to avoid unwanted changes on current-context it was removed. Though, if someone can opt-in with a setting in preferences it makes sense so that you can keep UI and CLI in sync.

Bare in mind though, that would be one-way sync, if changes of current context was done (e.g. with kubectx) by CLI, the UI would not pick them up automatically.

Also, for namespaces something similar could be engineered (so that when you change the namespace dropdown it functions as using kubens) by adding another flag to update context's default namespace.

ptuchik commented 4 years ago

Hi,

Thanks for the quick reply. Anyways currently if Kubernetic is opened and you are changing the current context from CLI like kubectl config use-context Kubernetic is not switching the context until closing and re-opening it.

I think if an option in preferences is not so hard to implement, that would be great and useful.

dominch commented 3 years ago

I don't think it should be default option, none of k8s utils does that, I don't want to switch to prod namespace via that select ;)

dkapanidis commented 3 years ago

I don't think it should be default option, none of k8s utils does that, I don't want to switch to prod namespace via that select ;)

That is sensible enough, no worries it will not be default option.