gcloud container clusters get-credentials
SafeConnect to GKE
gcloud container clusters get-credentials <cluster> --region <r>
Wires kubectl to a GKE cluster — the prerequisite step before any kubectl work.
Examples
gcloud container clusters get-credentials prod --region asia-northeast1Connect to a Tokyo cluster
Syntax
gcloud container clusters [get-credentials|list] [--region r]
Before you run it
Fetches credentials only.
Related commands
- kubectl config use-contextSwitch cluster context
- az aks get-credentialsConnect to AKS
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store