The upgrade rancher dilemna
OK.
It's been awhile since I have not upgraded Rancher and the K3S cluster infra and I think it's maybe thge good time to upgrade my infra to be up to date.
Problem is that I fear this upgrade because I went in the past into some big issues like the rancher webgui not accessible and haf to restore back all the vms of the infra.
But well, that's not a good reason to not to upgrade!
So, I have decided to make it more clean and have a way to:
- Backup
- Plan
- Test
- Do
- Validate
the update tasks.
This time I really be organized and do this update once for all!
So, my initial plan is to use rancher 2.7.5 because the 2.7.6 and the 2.7.7 seems to be in RC with and not sure exactly what is the difference between the 2...
Anyway!
Let's have a look at my current setup:
- 3 master nodes (centos 7.9)
- 3 workers (centos 7.9)
- kube-vip used as the VIP manager
- curent version of rancher 2.6.9 (to date, 2.6.13 is the latest of the 2.6.x serie)
Current version of K3s (I used k3sup to install it)
[root@node-1 ~]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
node-1 Ready control-plane,etcd,master 2y142d v1.21.12+k3s1 192.168.2.100 <none> CentOS Linux 7 (Core) 3.10.0-1160.88.1.el7.x86_64 containerd://1.4.13-k3s1
node-2 Ready control-plane,etcd,master 442d v1.21.12+k3s1 192.168.2.101 <none> CentOS Linux 7 (Core) 3.10.0-1160.49.1.el7.x86_64 containerd://1.4.13-k3s1
node-3 Ready control-plane,etcd,master 431d v1.21.12+k3s1 192.168.2.102 <none> CentOS Linux 7 (Core) 3.10.0-1160.88.1.el7.x86_64 containerd://1.4.13-k3s1
worker-1 Ready <none> 2y142d v1.21.12+k3s1 192.168.2.103 <none> CentOS Linux 7 (Core) 3.10.0-1160.49.1.el7.x86_64 containerd://1.4.13-k3s1
worker-2 Ready <none> 2y142d v1.21.12+k3s1 192.168.2.104 <none> CentOS Linux 7 (Core) 3.10.0-1160.88.1.el7.x86_64 containerd://1.4.13-k3s1
worker-3 Ready <none> 356d v1.21.12+k3s1 192.168.2.105 <none> CentOS Linux 7 (Core) 3.10.0-1160.49.1.el7.x86_64 containerd://1.4.13-k3s1
Now we need to check what is que OS, K3S requirements to do the upgade to 2.7.5.
There is a website that describe the support matrix for rancher: https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/rancher-v2-7-5/
So we we look at what we want vs what we got:
| Rancher Version |
Low |
High |
| 2.7.5 |
1.23 |
1.26 |
| 2.6.9 |
1.20 |
1.24 |
| 2.6.13 |
1.20 |
1.24 |
And in the K/S section of the page you can check what K3S version is supported per OS version:
Let say that we want to stick with Centos or Rocky linux:
| K3S Version |
Low |
High |
|
v1.24.15+k3s1 |
Centos 7.9 |
Rocky Linux 8.4/8.5/8.6 |
|
v1.26.6+k3s1 |
N/A |
Rocky Linux 8.7/8.8/8.9/9.0/9.1/9.2 |
| v1.21.12+k3s1 |
?? |
?? |
So it seems to be pretty clear that if I want to go to 1.26, I will will to go with Rocky 9. Or switch to Ubuntu...