Skip to content

Instantly share code, notes, and snippets.

@ianfoo
Created May 21, 2019 20:32
Show Gist options
  • Select an option

  • Save ianfoo/189a7c73e17e81c016fcd0e13fa22104 to your computer and use it in GitHub Desktop.

Select an option

Save ianfoo/189a7c73e17e81c016fcd0e13fa22104 to your computer and use it in GitHub Desktop.
Managing multiple gcloud configs, and upgrading GKE clusters

Manage multiple gcloud configurations

  • Makes it easy to bounce around different GCP projects
  • gcloud config configurations activate
  • `gcloud config set <[section/]property>
  • Configurations stored in $XDG_CONFIG_HOME/gcloud/configurations
    • No way to clone a configuration with gcloud, so you can copy files to start.

Upgrading a GKE cluster

  • gcloud container clusters upgrade <cluster-name>
  • You will need --region or --zone if the correct one is not set in the gcloud configuration
  • If node pool is set to auto-upgrade, you only need to upgrade the master
    • Auto-upgrade will upgrade nodes to master version during a maintenance window.
    • If auto-upgrade is on but you want to upgrade everything yourself, you will not be able to upgrade all the nodes at the same time. Master first, then the entire node pool.
      • This implies that one node will be "upgraded" twice, since one of the node pools is actually the master node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment