-
Notifications
You must be signed in to change notification settings - Fork 31
/
almalinux8-multi-upgrade.sh
executable file
·29 lines (22 loc) · 1.14 KB
/
almalinux8-multi-upgrade.sh
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
#!/bin/bash -e
# build latest pke tool
GOOS=linux make pke
KUBERNETES_VERSION="${1:-v1.23.3}"
# upgrade first master node
echo ""
echo "= almalinux1 ========================================================================"
vagrant ssh almalinux1 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION'"
# waiting 20 seconds because of apiserver
sleep 20
# upgrade second master node
echo ""
echo "= almalinux2 ========================================================================"
vagrant ssh almalinux2 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION' --kubernetes-additional-control-plane"
# upgrade third master node
echo ""
echo "= almalinux3 ========================================================================"
vagrant ssh almalinux3 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION' --kubernetes-additional-control-plane"
# upgrade worker node
echo ""
echo "= almalinux4 ========================================================================"
vagrant ssh almalinux4 -c "sudo /banzaicloud/pke upgrade worker --kubernetes-version='$KUBERNETES_VERSION'"