-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
The az acs kubernetes get-credentials command is really useful, however, I noticed that it seems to overwrite the local kube config file (e.g. ~/.kube/config), and I can't seem to find a way to have it simply add the new cluster/context/user info to my existing kube config file (unless I choose to do it myself and not use this command). It would be cool if there was a way for me to do something along the lines of any of the following:
-
Have the
get-credentialscommand add to the default config file. This behavior is similar to how minikube seems to work when you initialize a development cluster. It auto-adds the cluster details to your config in a non-invasive way. -
Provide a mode that simply outputs the necessary shell commands (e.g.
kubectl config set-cluster) in order to augment the default config file, which allows you to eval it yourself, similarly to howdocker-machine envworks. Code bootstrap #1 would presumably be an automated version of this. -
Write the ACS-specific config file to a specified location on disk, so I could update my
KUBECONFIGenv var and merge together the multiple config files, or explicitly use the--kubeconfigflag when using the k8s CLI. Maybe the existing behavior could default to the global config path, but you could override it with a flag.
Maybe the existing behavior is fine in practice, so I'm just throwing this out there for conversation, but it would be cool to have the same simple experience of creating an ACS cluster and connecting to it, without affecting a user's existing config settings.