container:kubernetes:k3s_update
This is an old revision of the document!
Table of Contents
Update vom K3s Cluster
Ein Upgrade ist im Grunde ganz einfach.
Es gibt verschiedene Möglichkeiten
- Via Installations Script
- Voll Automatisch via - system-upgrade-controller
- Manuell
Aktuell gehe ich nur die Version via Installations Script ein
Via Installations Script
Es ist wichtig das man die Parameter vom installieren noch weiß da man diese hier wieder anwenden sollte / muss!
Das Upgrade funktioniert genau wie eine Installation auch.
Beispiel: curl -sfL https://get.k3s.io | sh -
Hier sollten aber wie gesagt die Parameter von jeder Node bei der Installation berücksichtigt werden.
Upgrade K3s Using the Installations Script - Master Node
root@kube01:~# kubectl get nodes NAME STATUS ROLES AGE VERSION kube01 Ready master 13d v1.19.4+k3s1 kube02 Ready <none> 13d v1.19.4+k3s1 kube03 Ready <none> 13d v1.19.4+k3s1 export INSTALL_K3S_EXEC="--disable servicelb --disable traefik" curl -sfL https://get.k3s.io | sh - [INFO] Finding release for channel stable [INFO] Using v1.19.5+k3s2 as release [INFO] Downloading hash https://github.com/rancher/k3s/releases/download/v1.19.5+k3s2/sha256sum-amd64.txt [INFO] Downloading binary https://github.com/rancher/k3s/releases/download/v1.19.5+k3s2/k3s [INFO] Verifying binary download [INFO] Installing k3s to /usr/local/bin/k3s [INFO] Skipping /usr/local/bin/kubectl symlink to k3s, already exists [INFO] Skipping /usr/local/bin/crictl symlink to k3s, already exists [INFO] Skipping /usr/local/bin/ctr symlink to k3s, already exists [INFO] Creating killall script /usr/local/bin/k3s-killall.sh [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh [INFO] env: Creating environment file /etc/systemd/system/k3s.service.env [INFO] systemd: Creating service file /etc/systemd/system/k3s.service [INFO] systemd: Enabling k3s unit Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service. [INFO] systemd: Starting k3s root@kube01:~# kubectl get nodes NAME STATUS ROLES AGE VERSION kube01 Ready master 13d v1.19.5+k3s2 kube02 Ready <none> 13d v1.19.4+k3s1 kube03 Ready <none> 13d v1.19.4+k3s1
Upgrade K3s Using the Installations Script - Slave Node
curl -sfL https://get.k3s.io | sh -
container/kubernetes/k3s_update.1608545346.txt.gz · Last modified: by stone
