Continental Innovates with Rancher and Kubernetes
You can upgrade K3s by using the installation script, or by manually installing the binary of the desired version.
Note: When upgrading, upgrade server nodes first one at a time, then any worker nodes.
Upgrades performed via the installation script or using our automated upgrades feature can be tied to different release channels. The following channels are available:
v1.18
v1.17
v1.16
For an exhaustive and up-to-date list of channels, you can visit the k3s channel service API. For more technical details on how channels work, you see the channelserver project.
To upgrade K3s from an older version you can re-run the installation script using the same flags, for example:
curl -sfL https://get.k3s.io | sh -
This will upgrade to a newer version in the stable channel by default.
If you want to upgrade to a newer version in a specific channel (such as latest) you can specify the channel:
curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=latest sh -
If you want to upgrade to a specific version you can run the following command:
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=vX.Y.Z-rc1 sh -
Or to manually upgrade K3s:
/usr/local/bin/k3s
Restarting K3s is supported by the installation script for systemd and OpenRC.
systemd
To restart servers manually:
sudo systemctl restart k3s
To restart agents manually:
sudo systemctl restart k3s-agent
OpenRC
sudo service k3s restart
sudo service k3s-agent restart