At work and at home I primarily run on-prem Kubernetes with k3s and utilize SUSE Rancher UI. These two tools make for a nice combination for running Kubernetes.
While Rancher is certainly nice for managing the cluster, I tend to do most of my deployments from the cli with kubectl.
Anyhow, I was having issues with my clusters when I would upgrade Kubernetes. SUSE suggests upgrading your cluster via the Rancher UI for upgrades. This has always been problematic for me as it would upgrade one node, but none of the others.
ie after triggering Rancher to upgrade Kubernetes I get...
NAME STATUS ROLES AGE VERSION
mynode1.mydomain.com Ready control-plane,master 290d v1.32.5+k3s1
mynode2.mydomain.com Ready control-plane,master 289d v1.31.9+k3s1
mynode3.mydomain.com Ready control-plane,master 289d v1.31.9+k3s1
So today this blog post is about how to correct this half-hearted upgrade. The important thing is you must remember the parameters you used to install your cluster with in the first place. (take note!)
While it depends if you're installing the first node vs secondary master nodes or worker nodes. It will look something like this:
curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=stable K3S_URL=[RANCHER_URL] K3S_TOKEN=[TOKEN] sh -
Ensure you keep a copy of whatever your install configuration was and you can use it to upgrade your nodes at a later date. In my case, I just ran the install command again on each of the nodes and rectified the issue.
NAME STATUS ROLES AGE VERSION
mynode1.mydomain.com Ready control-plane,master 290d v1.32.5+k3s1
mynode2.mydomain.com Ready control-plane,master 289d v1.32.5+k3s1
mynode3.mydomain.com Ready control-plane,master 289d v1.32.5+k3s1
Hopefully that helps someone who landed in my boat.
No comments:
Post a Comment