1. Create a directory in the .kube folder:
❯ mkdir -p ~/.kube/configs
2. Download all the config files and place them in the folder
❯ cd ~/.kube/configs
❯ mv ~/Downloads/dev.yml .
❯ mv ~/Downloads/test.yml .
3. Install Konfig
❯ kubectl krew install konfig
4. Use Konfig to merge all the configs into a single config file that Kubernetes uses
❯ kubectl konfig merge ~/.kube/configs/* > ~/.kube/config
Now, you can easily switch between different environments using kubectx and kubens.
Top comments (0)