talira

system-upgrade-controller

In your Kubernetes, upgrading your nodes

open sourceApache-2.0self-hostablefree

system-upgrade-controller is Rancher's general-purpose, Kubernetes-native upgrade controller for nodes. You write a Plan, a custom resource that selects nodes by label, sets how many to upgrade at once and names a container image (by version or a release channel); the controller runs a privileged Job on each selected node, with the host's root filesystem mounted, optionally cordoning and draining it first, and labels the node when the Job succeeds. K3s and RKE2 use it for their automated cluster upgrades, and Plans can just as well upgrade OS packages or kernels. It's Apache-2.0 and installs with one kubectl apply.

Problems it solves

  • upgrade K3s on every node of a cluster automatically instead of running the install script on each one
  • roll out a new Kubernetes version to RKE2 nodes one at a time from inside the cluster
  • declare node upgrades as a Kubernetes resource and let a controller apply them
  • follow a release channel so our cluster upgrades itself when a new stable version ships
  • upgrade OS packages or the kernel on Kubernetes nodes with a pinned version, from a container image
  • limit how many nodes get upgraded at the same time and drain each one first
  • upgrade server nodes before agent nodes in a lightweight Kubernetes cluster
  • GitOps-managed Kubernetes version upgrades for edge clusters

Features

  • Plan CRD (upgrade.cattle.io/v1) selecting nodes with a label selector
  • concurrency limit for how many nodes upgrade at once
  • version pinning or a channel URL that resolves the latest version
  • upgrade Jobs with host IPC, network and PID, CAP_SYS_BOOT and the host root mounted at /host
  • optional cordon and drain like kubectl
  • labels each node with the applied Plan's hash when its Job completes
  • example Plans for upgrading K3s, Ubuntu packages and kernels
  • per-release manifests and a kustomization for kubectl apply -k

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what system-upgrade-controller does.

  1. Kured Kubernetes Reboot Daemon

Compare system-upgrade-controller with the top 3