In this lab we are going to upgrade a Rancher Cluster and the K8s that it is running on.
- Rancher Server running a pervious version
- Kubernetes Cluster
- K3s Cluster running a previous version
- RKE Cluster running a previous version
- Backup of Rancher Server
curl -sfL https://get.k3s.io | sh -
Example:
[INFO] Finding release for channel stable
[INFO] Using v1.21.4 k3s1 as release
[INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.21.4 k3s1/sha256sum-amd64.txt
[INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.21.4 k3s1/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
1) Use the instructions in the link below to download the latest RKE Binary and copy it to /usr/local/bin
https://rancher.com/docs/rke/latest/en/installation/#download-the-rke-binary
rke up --config cluster.yml
helm repo update
helm repo list
Example
NAME URL
jetstack https://charts.jetstack.io
rancher-latest https://releases.rancher.com/server-charts/latest
helm fetch rancher-latest/rancher
helm upgrade rancher rancher-latest/rancher --namespace cattle-system --set hostname=yourhost.fqdn --set replicas=1
helm get values rancher -n cattle-system