Add Context Name Flag For `gcloud container clusters get-credentials`
Right now, when you run
gcloud container clusters get-credentials, gcloud will produce a user spec, a cluster spec, and a context spec in
~/.kube/config, all with long generated names. For the user spec and the cluster spec, that's great: the kubernetes user will mostly be reading these but not typing them, so the important criteria should be uniqueness and that the name make clear where the thing is from. For the context, spec, however, long generated names are a very poor choice: these exist so the user can quickly switch between configuration spaces by typing, for example,
kubectl config use-context production or
kubectl config use-context minikube. Thus, these names should strike a balance between being typeable and being recognizable, while necessarily remaining unique. I don't think a generated name will ever truly strike the right balance here. Thus, it'd be great if
gloud container clusters get-credentials would take a flag to let the user specify the kubectl context name themselves.