SUSE Support

Here When You Need Us

How to rollback the Kubernetes version of a Rancher v2.x provisioned RKE1 cluster

This document (000020195) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.x launched RKE1 clusters.

Situation

To roll back your Kubernetes cluster version upgrade, you need to first have taken an etcd snapshot before the upgrade. You should keep the reference of the snapshot name that was created as your "pre-upgrade" snapshot. In my cluster which has cluster ID: c-q8st7 , my snapshot name was c-q8st7-ml-qdxdh. Our example upgrade is from v1.27.16-rancher1-1 to v1.28.12-rancher1-1.

Resolution

A Kubernetes Cluster Rollback will most definitely cause downtime in the cluster, as you are restoring a snapshot from before the upgrade, and the cluster will have to go through the process of reconcilation.

Rollback operation

To rollback, you must:

  • Edit Cluster from Cluster Management.
  • Edit as YAML
  • Find the key kubernetes_version in the YAML and set it back to v1.27.16-rancher1-1 (or whatever your desired restore version is)
  • Find the restore key in the YAML. You will need to update the following configuration from:
rancher_kubernetes_engine_config:
    restore:
    restore: false
To the below configuration which instructs the cluster to use the Snapshot that was taken prior upgrade to perform a rollback:
rancher_kubernetes_engine_config:
    restore:
    restore: true
    snapshot_name: "c-q8st7:c-q8st7-ml-qdxdh"

Note the snapshot_name has the cluster ID prefixed to it with a ":". 

  • Finally, you can save the cluster, and observe the snapshot restore + K8s version rollback occur.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020195
  • Creation Date: 06-May-2021
  • Modified Date:14-Aug-2024
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.