Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop setting a GKE specific version of the kubeconfig file #7921

Merged
merged 1 commit into from May 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions cluster/kubectl.sh
Expand Up @@ -100,13 +100,20 @@ elif [[ ! -x "${KUBECTL_PATH}" ]]; then
fi
kubectl="${KUBECTL_PATH:-${kubectl}}"

# GKE stores it's kubeconfig in a separate location.
if [[ "$KUBERNETES_PROVIDER" == "gke" ]]; then
detect-project &> /dev/null
config=(
"--kubeconfig=${HOME}/.config/gcloud/kubernetes/kubeconfig"
"--context=gke_${PROJECT}_${ZONE}_${CLUSTER_NAME}"
)
# In gcloud versions prior to 0.9.59, GKE stores it's kubeconfig
# in a separate location. If the file doesn't exist, then use
# the default kubeconfig file.
# TODO(roberthbailey): Remove this once gcloud 0.9.59 is released.
if [[ ! -e "${HOME}/.config/gcloud/kubernetes/kubeconfig" ]]; then
config+=(
"--kubeconfig=${HOME}/.config/gcloud/kubernetes/kubeconfig"
)
fi
elif [[ "$KUBERNETES_PROVIDER" == "ubuntu" ]]; then
detect-master > /dev/null
config=(
Expand Down