mirceanton / kubectl-switch

A simple tool to help manage multiple kubeconfig files
MIT License
4 stars 0 forks source link

feat: `--strategy` flag for context switching #70

Open mircea-pavel-anton opened 1 month ago

mircea-pavel-anton commented 1 month ago

If strategy is set to merge, create a big kubeconfig with all the contexts defined in all kubeconfig files and set active context.

If strategy is set to copy, just copy over the one kubeconfig file with the wanted context and set active context.

This way, with the merge strategy (which can be the default?), things like passing --context to kubectl commands or selecting contexts in k9s would still work