Add a kubectl config entry for a cluster in Google Cloud

[Total: 0 Average: 0/5]
With the gcloud SDK one can add a cluster configuration int the kubectl config with the following command:
gcloud container clusters get-credentials CLUSTER_NAME \ --zone ZONE_NAME --project PROJECT_NAME
If you’re already authenticated with gcloud against the right project and the right zone, the following command is good enough:
gcloud container clusters get-credentials CLUSTER_NAME
At this point the current context is set to the target cluster and one can get cluster informations with kubectl.