k8s upgrade script (a key upgrade k8s version of the script)

hi! ~ Today on our k8s script repaired, modified many functions.
Also wrote a k8s upgrade script, as long as the use of k8s Porco deployment scripts to deploy a cluster key, you can upgrade to any version of it! The best case, so I do not have to write each version of a deployment script.
So which version can rise to it?

 
 
Those who use
 
yum list --showduplicates kubeadm --disableexcludes=kubernetes

The version can be found can be a key upgrades include (1.17.0), of course, provided you are old versions of k8s cluster is a key deployment script I wrote deployment.

 Bokor directly upgrade to 1.14.1 1.15.7 (most stable version)
 
 

So how to upgrade it? Porco Porco old friend should have to find out a routine. Yes, we only need to modify the parameters, and then execute the script.

 
 

 

On these parameters, the parameters needed here like old cluster, including IP, host name:
In addition to kubeadm_version = "1.14.10", this is the target that you want to upgrade the version number. For example, there is a version before 1.14.1 Bokor, you want to upgrade to 1.14.10 which is the most stable version of this release. Then you write 1.14.10.
The version number you look at Ay! Wrote inside the red circle, do not bring back -0

 
image

 

Then execute

 
image

You can upgrade!
Upgrading rule is a node upgrade a node, the node is being upgraded call will be prohibited, and driving above pods. Upgrade is completed will lift the ban call. pods are drifting back!
With this script, you do not have to redeploy it!
Feel helpful, do not forget to help Bogota forward Oh! ~
Public concern No reply: upgrade script   can get the script

Guess you like

Origin www.cnblogs.com/devops-ITboge/p/12194422.html