From 3da5d27ab23b96e0b40206f28052571f1367843c Mon Sep 17 00:00:00 2001 From: Jeff Lowdermilk Date: Wed, 11 Feb 2015 12:07:59 -0800 Subject: [PATCH] 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. --- cluster/gce/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 5345ba91ce4..7aaecae2ae1 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -507,7 +507,7 @@ function kube-up { local kube_auth="kubernetes_auth" local kubectl="${KUBE_ROOT}/cluster/kubectl.sh" - local context="${INSTANCE_PREFIX}" + local context="${PROJECT}-${INSTANCE_PREFIX}" local user="${INSTANCE_PREFIX}-admin" local config_dir="${HOME}/.kube/${context}"