No description
  • Shell 84.4%
  • Makefile 8.2%
  • Dockerfile 7.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] 9cf272d618
Bump actions/checkout from 6.0.2 to 7.0.0 (#126)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](de0fac2e45...9c091bb21b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-24 10:40:46 -07:00
.github Bump actions/checkout from 6.0.2 to 7.0.0 (#126) 2026-06-24 10:40:46 -07:00
scripts Actually validate the sha256sums we're already pulling 2026-03-29 17:02:41 -04:00
updatecli chore: Update key "version" from file "/tmp/updatecli/github/k3s-io/k... (#63) 2023-05-08 10:21:13 -05:00
.gitignore Add upgrade image for version v1.17.0+k3s.1 2020-01-28 21:06:02 +02:00
Dockerfile Bump alpine 2026-04-27 13:21:56 -04:00
Dockerfile.manifest Bump alpine from 3.23 to 3.24 (#125) 2026-06-24 10:40:07 -07:00
LICENSE Update LICENSE 2020-09-11 02:34:30 +02:00
Makefile Remove PRIME_RIBS env 2025-11-14 11:53:35 -03:00
README.md Legacy script removal (#96) 2025-10-27 08:52:30 -07:00

k3s-upgrade

k3s-upgrade is an image that is responsible of upgrading k3s version via the System Upgrade Controller, it does that by doing the following:

  • Replace the k3s binary with the new version
  • Kill the old k3s process allowing the supervisor to restart k3s with the new version

Build

To build the k3s-upgrade image locally, you can run the following:

export ARCH=amd64 TAG=v1.17.2+k3s1
docker build --build-arg ARCH --build-arg TAG --tag ${REPO:=k3s-io}/k3s-upgrade:${TAG/+/-} .

Usage

Prerequisites

  • K3s has to be installed using the install script using the curl command:
curl -sfL https://get.k3s.io | sh -

Example

1- To use the image with the system-upgrade-controller, you have first to run the controller either directly or deploy it on the k3s cluster:

kubectl apply -f https://raw.githubusercontent.com/rancher/system-upgrade-controller/master/manifests/system-upgrade-controller.yaml

You should see the upgrade controller starting in system-upgrade namespace.

2- Label the nodes you want to upgrade with the right label:

kubectl label node <node-name> k3s-upgrade=true

3- Run the upgrade plan in the k3s cluster

---
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
  name: k3s-latest
  namespace: system-upgrade
spec:
  concurrency: 1
  version: v1.17.2-k3s1
  nodeSelector:
    matchExpressions:
      - {key: k3s-upgrade, operator: Exists}
  serviceAccountName: system-upgrade
  drain:
    force: true
  upgrade:
    image: rancher/k3s-upgrade

The upgrade controller should watch for this plan and execute the upgrade on the labeled nodes. For more information about system-upgrade-controller and plan options please visit system-upgrade-controller official repo.

Contact

For bugs, questions, comments, corrections, suggestions, etc., open an issue in k3s-io/k3s with a title starting with [k3s-upgrade] .