Last active
October 5, 2017 01:28
-
-
Save nestoru/98aacd14ac0bda2d3a33642c9676bb83 to your computer and use it in GitHub Desktop.
gke kubernetes upgrade.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add temporary access from 0.0.0.0/0 (anywhere) to protected services pods connect to | |
# check cluster version | |
gcloud container clusters list | |
# switch to the specific project | |
gcloud config set project my-project | |
gcloud container clusters get-credentials my-project-cluster --zone us-east1-b --project my-project | |
# check available versions | |
gcloud container get-server-config | |
# upgrade cluster master. Note that you have to go up one minor version at a time, for example 1.5.7 needs to go up to 1.6.7 before being upgraded to 1.7.2 | |
gcloud container clusters upgrade my-project-cluster --master --cluster-version=1.7.6-gke.1 | |
# upgrade cluster nodes | |
gcloud container clusters upgrade my-project-cluster --cluster-version=1.7.6 | |
# list instances external IPs | |
gcloud compute instances list | |
# remove access from old external pod IPs, add access to the new external IPs using CIDR /32 | |
# remove temporary access from 0.0.0.0/0 (anywhere) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment