blob: c2f97d401bb464b0b73304b6c5c32f281c779b13 (
plain) (
blame)
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
|
Cluster Upgrades:
=================
primary master:
---------------
VERSION=1.23.1
apt-get update
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubeadm.pref
apt-get install -y "kubeadm=$VERSION-00"
kubeadm version
kubeadm upgrade plan
kubectl drain $(hostname) --ignore-daemonsets --delete-emptydir-data
kubeadm upgrade apply "v$VERSION"
sed "s/^kubernetesVersion: .*$/kubernetesVersion: $VERSION/" -i /etc/kubernetes/kubeadm.config
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubelet.pref
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubectl.pref
apt-get update && apt-get install -y "kubelet=$VERSION-00" "kubectl=$VERSION-00"
// security updates + reboot ?
kubectl uncordon $(hostname)
secondary master:
-----------------
VERSION=1.23.1
apt-get update
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubeadm.pref
apt-get install -y --allow-change-held-packages "kubeadm=$VERSION-00"
kubectl drain $(hostname) --ignore-daemonsets --delete-emptydir-data
kubeadm upgrade node
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubelet.pref
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubectl.pref
apt-get update && apt-get install -y kubelet="$VERSION-00" "kubectl=$VERSION-00"
// security updates + reboot ?
kubectl uncordon $(hostname)
worker nodes:
-------------
VERSION=1.23.1
apt-get update
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubeadm.pref
apt-get install -y "kubeadm=$VERSION-00"
@primary master: kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
kubeadm upgrade node
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubelet.pref
sed "s/^Pin: version .*$/Pin: version $VERSION-00/" -i /etc/apt/preferences.d/kubectl.pref
apt-get update && apt-get install -y kubelet="$VERSION-00" "kubectl=$VERSION-00"
// security updates + reboot ?
@primary master: kubectl uncordon <node>
|