Benutzer-Werkzeuge

Webseiten-Werkzeuge


it-wiki:kubernetes:rke2_upgrade_guid

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
it-wiki:kubernetes:rke2_upgrade_guid [2024/03/07 16:47] – angelegt markoit-wiki:kubernetes:rke2_upgrade_guid [2025/04/29 06:05] (aktuell) – [Add the plans] marko
Zeile 20: Zeile 20:
 Install the controller with the following command: Install the controller with the following command:
 <code bash> <code bash>
-kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.2/system-upgrade-controller.yaml+kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.15.2/system-upgrade-controller.yaml
 </code> </code>
  
Zeile 30: Zeile 30:
 ==== Add the plans ==== ==== Add the plans ====
 Example Master node plans: Example Master node plans:
-<code bash>+<code yaml>
 apiVersion: upgrade.cattle.io/v1 apiVersion: upgrade.cattle.io/v1
 kind: Plan kind: Plan
Zeile 62: Zeile 62:
   upgrade:   upgrade:
     image: rancher/rke2-upgrade     image: rancher/rke2-upgrade
-  version: v1.28.7+rke2r1+  version: v1.31.7+rke2r1
 </code> </code>
  
Zeile 68: Zeile 68:
  
 Example Worker node plans: Example Worker node plans:
-<code bash>+<code yaml>
 apiVersion: upgrade.cattle.io/v1 apiVersion: upgrade.cattle.io/v1
 kind: Plan kind: Plan
Zeile 105: Zeile 105:
   upgrade:   upgrade:
     image: rancher/rke2-upgrade     image: rancher/rke2-upgrade
-  version: v1.28.7+rke2r1+  version: v1.31.7+rke2r1
 </code> </code>
  
Zeile 123: Zeile 123:
 kubectl label node <control-plane-node> rke2-upgrade=true --overwrite kubectl label node <control-plane-node> rke2-upgrade=true --overwrite
 </code> </code>
 +\\
 +\\
 +
 +====== Manual Upgrades ======
 +You can upgrade rke2 by using the installation script, by manually installing the binary of the desired version, or by using rpm upgrades in case of rpm installation.
 +
 +<note important>Note: Upgrade the server nodes first, one at a time. Once all servers have been upgraded, you may then upgrade agent nodes.</note>
 +
 +===== Release Channels =====
 +Upgrades performed via the installation script or using our [[it-wiki:kubernetes:rke2_upgrade_guid]] feature can be tied to different release channels. The following channels are available:
 +^ Channal         ^ Description ^
 +| stable         | (Default) Stable is recommended for production environments. These releases have been through a period of community hardening, and are compatible with the most recent release of Rancher. |
 +| latest         | Latest is recommended for trying out the latest features. These releases have not yet been through a period of community hardening, and may not be compatible with Rancher. |
 +| v1.29 (example) | There is a release channel tied to each Kubernetes minor version, including versions that are end-of-life. These channels will select the latest patch available, not necessarily a stable release. |
 +
 +For an exhaustive and up-to-date list of channels, you can visit the rke2 channel service API. For more technical details on how channels work, you can see the channelserver project.
 +
 +<note tip>When attempting to upgrade to a new version of RKE2, the Kubernetes version skew policy applies. Ensure that your plan does not skip intermediate minor versions when upgrading. Nothing in the upgrade process will protect against unsupported changes to the Kubernetes version.</note>
 +
 +===== Upgrade rke2 Using the Installation Script =====
 +To upgrade rke2 from an older version you can re-run the installation script using the same flags, for example:
 +
 +<code bash>curl -sfL https://get.rke2.io | sh -</code>
 +
 +This will upgrade to the most recent version in the stable channel by default.
 +
 +If upgrading agent nodes, you should specify the INSTALL_RKE2_TYPE environment variable:
 +
 +<code bash>curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE=agent sh -</code>
 +
 +If you want to upgrade to the most recent version in a specific channel (such as latest) you can specify the channel:
 +
 +<code bash>curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=latest sh -</code>
 +
 +If you want to upgrade to a specific version you can run the following command:
 +
 +<code bash>curl -sfL https://get.rke2.io | INSTALL_RKE2_VERSION=vX.Y.Z+rke2rN sh -</code>
 +
 +Remember to restart the rke2 process after installing:
 +
 +# Server nodes:
 +<code bash>systemctl restart rke2-server</code>
 +
 +# Agent nodes:
 +<code bash>systemctl restart rke2-agent</code>
 +
 +===== Restarting rke2 =====
 +Restarting rke2 is supported by the installation script for systemd.
 +
 +systemd
 +
 +To restart servers manually:
 +
 +<code bash>sudo systemctl restart rke2-server</code>
 +
 +To restart agents manually:
 +
 +<code bash>sudo systemctl restart rke2-agent</code>
it-wiki/kubernetes/rke2_upgrade_guid.1709830020.txt.gz · Zuletzt geändert: 2024/03/07 16:47 von marko