Editing
K3s - Kubernetes Simplified
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Automated Upgrades: System Upgrade Controller == Rancher has taken the simplicity of k3s to another level by providing a kubernetes controller that can update the cluster ``from within the cluster`` using the [https://rancher.com/docs/k3s/latest/en/upgrades/automated/ System Upgrade Controller]. Installing the controller is straightforward using a single manifest (also located in the git repo): kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.7.6/system-upgrade-controller.yaml The controller looks for upgrade plans as custom resources (of type 'Plan', for some odd reason) to define its behavior. Two 'Plan's are required ... one for server/master nodes and one for agent/worker nodes. These plans can be set up to either upgrade to a specific k3s version or to monitor the release channel and automatically upgrade when a new release is available. The manifest looks like this: <pre># Server plan apiVersion: upgrade.cattle.io/v1 kind: Plan metadata: name: server-plan namespace: system-upgrade spec: concurrency: 1 cordon: true nodeSelector: matchExpressions: - key: node-role.kubernetes.io/master operator: In values: - "true" serviceAccountName: system-upgrade upgrade: image: rancher/k3s-upgrade #version: v1.20.4+k3s1 channel: https://update.k3s.io/v1-release/channels/stable --- # Agent plan apiVersion: upgrade.cattle.io/v1 kind: Plan metadata: name: agent-plan namespace: system-upgrade spec: concurrency: 1 cordon: true nodeSelector: matchExpressions: - key: node-role.kubernetes.io/master operator: DoesNotExist prepare: args: - prepare - server-plan image: rancher/k3s-upgrade #:v1.17.4-k3s1 serviceAccountName: system-upgrade upgrade: image: rancher/k3s-upgrade #version: v1.20.4+k3s1 channel: https://update.k3s.io/v1-release/channels/stable</pre> Simply apply this manifest and the controller will identify nodes to upgrade and will take care of them as instructed. It's as simple as that. If you don't want to automatically upgrade, comment out the 'channel' parameter in each Plan, and uncomment the 'version' parameter and set it to the version to upgrade to and apply. The controller will see the new plan and act accordingly. If there is nothing to do, the controller just sits there waiting for a new plan with some work.
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information