Skip to content

Instantly share code, notes, and snippets.

@flrichar
Last active April 4, 2022 16:13
Show Gist options
  • Select an option

  • Save flrichar/69ff783f13bb0e299726eb24e45e51a9 to your computer and use it in GitHub Desktop.

Select an option

Save flrichar/69ff783f13bb0e299726eb24e45e51a9 to your computer and use it in GitHub Desktop.
the-suc.txt
# install system upgrade controller
kubectl apply -f https://raw.githubusercontent.com/rancher/system-upgrade-controller/master/manifests/system-upgrade-controller.yaml
# First, label the target node
kubectl label node/k3d-zues-server-0 k3s-upgrade=true
# Then create the plan object in the cluster
kubectl apply -f upgrade_plan.yml
...
# upgrade-plan.yaml
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
name: upgrade-plan
namespace: system-upgrade # created by system-upgrade controller manifest
spec:
concurrency: 1 # upgrade one node at a time
cordon: true # make the node unschedulable
nodeSelector:
matchExpressions:
- key: k3s-upgrade # upgrade nodes that are labeled with this
operator: In
values:
- "true"
serviceAccountName: system-upgrade # created by system-upgrade controller manifest
upgrade:
image: rancher/k3s-upgrade # this image does the heavy lifting
version: v1.20.15+k3s1 # target version to upgrade to
# dont forget to change version and label node, as above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment