Created
January 25, 2023 09:59
-
-
Save niklaskeerl/7d956b3629b71ca091ed25324b700851 to your computer and use it in GitHub Desktop.
Get kubeconfig for gcloud gke cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all gcloud projects | |
gcloud projects list | |
# Set Project ID from project list | |
gcloud config set project $PROJECT_ID | |
# List all cluster names and zones for this project ID | |
gcloud container clusters list | |
# Generate kubeconfig entry | |
gcloud container clusters get-credentials --zone $LOCATION $NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment