Skip to main content

Rolling Back K3s

You can roll back the K3s Kubernetes version after an upgrade, using a combination of K3s binary downgrade and datastore restoration. Rollback can be performed on clusters of all types, including a single-node SQLite, an external datastore, or an embedded etcd. When rolling back to a previous Kubernetes minor version, you must have a datastore snapshot taken on the Kubernetes minor version you wish to roll back to.

warning

If you cannot restore the database, you cannot roll back to a previous minor version.

Important Considerations

  • Backups: Before upgrading, ensure you have a valid database or etcd snapshot from your cluster running the older version of K3s. Without a backup, a rollback is impossible.
  • Potential Data Loss: The k3s-killall.sh script forcefully terminates K3s processes and may result in data loss if applications are not properly shut down.
  • Version Specifics: Always verify K3s and component versions before and after the rollback.

Rolling Back a K3s Cluster

To roll back a K3s cluster when using a SQLite database, replace the .db file with the copy of the .db file you made while backing up your database.

Verification

After the rollback, verify the following:

  • K3s version: k3s --version
  • Kubernetes cluster health: kubectl get nodes
  • Application functionality.
  • Check the K3s logs for errors.