标签:tar image role can install chosen RKE rest bec
root@k8s:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s Ready master 20d v1.18.2
node1 Ready worker 20d v1.18.2
node2 Ready worker 20d v1.18.2
node3 Ready worker 20d v1.18.2
trnuser@k8s:~$ kubectl cordon k8s
node/k8s cordoned
trnuser@k8s:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s Ready,SchedulingDisabled master 20d v1.18.2
node1 Ready worker 20d v1.18.2
node2 Ready worker 20d v1.18.2
node3 Ready worker 20d v1.18.2
trnuser@k8s:~$
sudo apt install kubeadm=1.19.7-00 kubectl=1.19.7-00 kubelet=1.19.7-00 -y
systemctl restart kubelet
trnuser@k8s:~$ sudo kubeadm upgrade apply v1.19.7
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with ‘kubectl -n kube-system get cm kubeadm-config -oyaml‘
[preflight] Running pre-flight checks.
[upgrade] Running cluster health checks
[upgrade/version] You have chosen to change the cluster version to "v1.19.7"
[upgrade/versions] Cluster version: v1.18.2
[upgrade/versions] kubeadm version: v1.19.7
[upgrade/confirm] Are you sure you want to proceed with the upgrade? [y/N]: y
[upgrade/prepull] Pulling images required for setting up a Kubernetes cluster
[upgrade/prepull] This might take a minute or two, depending on the speed of your internet connection
[upgrade/prepull] You can also perform this action in beforehand using ‘kubeadm config images pull‘
...
trnuser@k8s:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s Ready,SchedulingDisabled master 20d v1.19.7
node1 Ready worker 20d v1.18.2
node2 Ready worker 20d v1.18.2
node3 Ready worker 20d v1.18.2
trnuser@k8s:~$ kubectl uncordon k8s
node/k8s uncordoned
trnuser@k8s:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s Ready master 20d v1.19.7
node1 Ready worker 20d v1.18.2
node2 Ready worker 20d v1.18.2
node3 Ready worker 20d v1.18.2
标签:tar image role can install chosen RKE rest bec
原文地址:https://www.cnblogs.com/bigdad/p/14538222.html