Make gce's kubeconfig context include the gce project
Change the .kubeconfig context that gce kube-up creates to project + instance prefix, so you can spin up clusters with the same name in different compute projects without overwriting .kubeconfig.
This commit is contained in:
@@ -507,7 +507,7 @@ function kube-up {
|
|||||||
local kube_auth="kubernetes_auth"
|
local kube_auth="kubernetes_auth"
|
||||||
|
|
||||||
local kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
local kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||||
local context="${INSTANCE_PREFIX}"
|
local context="${PROJECT}-${INSTANCE_PREFIX}"
|
||||||
local user="${INSTANCE_PREFIX}-admin"
|
local user="${INSTANCE_PREFIX}-admin"
|
||||||
local config_dir="${HOME}/.kube/${context}"
|
local config_dir="${HOME}/.kube/${context}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user