I need to connect production and non-production environment using Azure CLI simultaneously through my windows system. I have access of both the environments and I have kube config file for both environment as well.
I am newbie to AKS so I am managing both file in my system and connecting either of environment using config file by renaming other file. e.g I have two file in my directory namely as C:\Users\foo\.kube with file name config and config-nonprod. So now I logged in to Azure CLI using below commands
- az login --scope foo
- az account set --subscription bar
Now if I run kubectl get ns command it will list the available namespace for production as my current config file is set to production.
Now if I want to connect non-prod environment then I just simply rename current config file to config-prod and current config-nonprod file to config. If I run kubectl get ns command then now it will list the available namespace for non-prod environment.
I don't want to do this exercise every time. I need any way by which I can connect both the environment simultaneously.
Prompt assistance will be highly appreciated.