For the instructions to upgrade Rancher installed on Kubernetes with RancherD, refer to
For the instructions to upgrade Rancher installed with Docker, refer to this page.
To upgrade the components in your Kubernetes cluster, or the definition of the or add-ons, refer to the , the Rancher Kubernetes Engine.
Prerequisites
Helm should be run from the same location as your kubeconfig file, or the same location where you run your kubectl commands from.
If you installed Kubernetes with RKE, the config will have been created in the directory you ran in.
The kubeconfig can also be manually targeted for the intended cluster with the --kubeconfig
tag (see: https://helm.sh/docs/helm/helm/)
Review Known Issues
Review the list of known issues for each Rancher version, which can be found in the release notes on GitHub and on the
Note that upgrades to or from any chart in the rancher-alpha repository aren’t supported.
The upgrade instructions assume you are using Helm 3.
For migration of installs started with Helm 2, refer to the official The Helm 2 upgrade page hereprovides a copy of the older upgrade instructions that used Helm 2, and it is intended to be used if upgrading to Helm 3 is not feasible.
For air gap installs: Populate private registry
For air gap installs only, collect and populate images for the new Rancher server version. Follow the guide to with the images for the Rancher version that you want to upgrade to.
If you are upgrading to Rancher v2.5 from a Rancher server that was started with the Helm chart option --add-local=false
, you will need to drop that flag when upgrading. Otherwise, the Rancher server will not start. The restricted-admin
role can be used to continue restricting access to the local cluster. For more information, see this section.
For upgrades with cert-manager older than 0.8.0
Let’s Encrypt will be blocking cert-manager instances older than 0.8.0 starting November 1st 2019. Upgrade cert-manager to the latest version by following
Upgrade Outline
Follow the steps to upgrade Rancher server:
1. Back up Your Kubernetes Cluster that is Running Rancher Server
You’ll use the backup as a restoration point if something goes wrong during upgrade.
2. Update the Helm chart repository
Update your local helm repo cache.
Get the repository name that you used to install Rancher.
For information about the repos and their differences, see .
Latest: Recommended for trying out the newest features
Stable: Recommended for production environments
Alpha: Experimental preview of upcoming releases.
Note: Upgrades are not supported to, from, or between Alphas.helm repo list
NAME URL
stable https://charts.helm.sh/stable
3. Upgrade Rancher
This section describes how to upgrade normal (Internet-connected) or air gap installations of Rancher with Helm.
Get the values, which were passed with --set
, from the current Rancher Helm chart that is installed.
helm get values rancher -n cattle-system
hostname: rancher.my.org
If you are also upgrading cert-manager to the latest version from a version older than 0.11.0, follow
Otherwise, follow Option A: Upgrading Rancher.
Upgrade Rancher to the latest version with all your settings.
Take all the values from the previous step and append them to the command using :
helm upgrade rancher rancher-<CHART_REPO>/rancher \
--namespace cattle-system \
--set hostname=rancher.my.org
Alternatively, it’s possible to export the current values to a file and reference that file during upgrade. For example, to only change the Rancher version:
Option B: Reinstalling Rancher and cert-manager
If you are currently running the cert-manger whose version is older than v0.11, and want to upgrade both Rancher and cert-manager to a newer version, then you need to reinstall both Rancher and cert-manger due to the API change in cert-manger v0.11.
Uninstall Rancher
helm delete rancher -n cattle-system
Uninstall and reinstall
cert-manager
according to the instructions on the Upgrading Cert-Manager page.Reinstall Rancher to the latest version with all your settings. Take all the values from the step 1 and append them to the command using
--set key=value
. Note: There will be many more options from the step 1 that need to be appended.helm install rancher rancher-<CHART_REPO>/rancher \
--set hostname=rancher.my.org
4. Verify the Upgrade
Log into Rancher to confirm that the upgrade succeeded.
Known Upgrade Issues
A list of known issues for each Rancher version can be found in the release notes on and on the Rancher forums.