Skip to content

Instantly share code, notes, and snippets.

@DStorck
Last active March 10, 2017 21:58
Show Gist options
  • Save DStorck/b74649564f1d2e68052047a9b6f7295c to your computer and use it in GitHub Desktop.
Save DStorck/b74649564f1d2e68052047a9b6f7295c to your computer and use it in GitHub Desktop.
gcloud kubernetes commands

Common gcloud commands

gcloud auth list - see a list of credentialed accounts

gcloud components list - see available components and whether or not they are installed

gcloud components install COMPONENT_ID . - install it

gcloud config list - show active configuration

gcloud config set SECTION PROPERTY VALUE - set new value

  • ex gcloud config set compute/zone zone3 or gcloud config set project myProject

gcloud container clusters list - list existing clusters for running containers

gcloud container get-server-config [--zone=ZONE] - find supported master and node versions for pods

gcloud container clusters upgrade $CLUSTER_NAME --cluster-version=$CLUSTER_VERSION - change version of k8s running on nodes

gcloud container clusters resize NAME --size=SIZE where size == target number of nodes in the cluster

gcloud info - provide general info about google SDK properties

gcloud container clusters get-credentials CLUSTER_ID --zone ZONE --project PROJECT_ID - configure kubectl command line access and connect to the cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment