homeserver/roles/PyratLabs.k3s/documentation/operations/updating-k3s.md
mg 3cc377c1a7 Rolle aktualisiert: k3s (#455)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #455
2023-02-17 12:00:24 +01:00

1.1 KiB

Updating k3s

Before you start!

Ensure you back up your k3s cluster. This is particularly important if you use an external datastore or embedded Etcd. Please refer to the below guide to backing up your k3s datastore:

https://rancher.com/docs/k3s/latest/en/backup-restore/

Also, check your volume backups are also working!

Proceedure

Updates using Ansible

To update via Ansible, set k3s_release_version to the target version you wish to go to. For example, from your v1.19.3+k3s1 playbook:

---
# BEFORE

- name: Provision k3s cluster
  hosts: k3s_cluster
  vars:
    k3s_release_version: v1.19.3+k3s1
  roles:
    - name: xanmanning.k3s

Updating to v1.20.2+k3s1:

---
# AFTER

- name: Provision k3s cluster
  hosts: k3s_cluster
  vars:
    k3s_release_version: v1.20.2+k3s1
  roles:
    - name: xanmanning.k3s

Automatic updates

For automatic updates, consider installing Rancher's system-upgrade-controller

Please note, to be able to update using the system-upgrade-controller you will need to set k3s_install_hard_links to true.