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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store