-
Notifications
You must be signed in to change notification settings - Fork 110
/
K8s Upgrade Steps
86 lines (39 loc) · 1.37 KB
/
K8s Upgrade Steps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
v1.18.3 --- 1.18.7
v1.18.3 --- 1.19.x
v1.18.3 --- 1.19.x --- 1.20.x
Ansible playbook --- Inventory Control planes Worker nodes
Controller Node:
1. Update Kubeadm
$ sudo apt-get install kubeadm-1.19.3
2. Drain the controller node(Evict any Kubernetes resources and disable scheduling)
$ kubectl drain kmaster --ignore-daemonsets
$ kubectl get nodes
3. Generate upgrade plan
$ kubeadm upgrade plan
4. Perform Kubernetes Upgrade
$ kubeadm upgrade apply v1.19.3
5. Update kubectl and kubelet
$ sudo apt-get install kubelet-1.19.3 kubectl-1.19.3
$ sudo systemctl daemon-reload
$ sudo systemctl restart kubelet
6. Un-cordon the controller node(Enable scheduling)
$ kubectl uncordon kmaster
7. Verify and validate
$ kubectl get nodes
Worker Node:
1. Update Kubeadm
$ sudo apt-get install kubeadm-1.19.3
2. Drain the respective node(Evict any Kubernetes resources and disable scheduling)
$ kubectl drain kslave1 --ignore-daemonsets --force
$ kubectl get nodes
3. Perform Kubernetes Upgrade
$ kubeadm upgrade node
4. Update kubectl and kubelet
$ sudo apt-get install kubelet-1.19.3 kubectl-1.19.3
$ sudo systemctl daemon-reload
$ sudo systemctl restart kubelet
5. Un-cordon the controller node(Enable scheduling)
$ kubectl uncordon kslave1
7. Verify and validate
$ kubectl get nodes
Remaining worker nodes