Skip to content

Kubeconfig Setup on GKE

Obtaining a Kubernetes Configuration for GKE

Given that you know:

  • the name of the Kubernetes cluster you installed $cluster
  • the region you installed to $region

You can use the gcloud command line tool to export a Kubernetes config file:

bash
KUBECONFIG=~/.kube/gke/$cluster-$region.config gcloud container clusters get-credentials $cluster --zone $region