Automated K3s Upgrades with System Upgrade Controller
Intermediatev1.0.0
Implement automated rolling upgrades for K3s clusters using the System Upgrade Controller — plan-based upgrades with drain, cordon, and version pinning.
Content
Overview
The K3s System Upgrade Controller (SUC) automates cluster upgrades by applying Plan resources that define target versions, node selectors, and upgrade strategies. It performs rolling upgrades — draining and cordoning nodes one at a time to maintain availability.
Why This Matters
- -Zero-downtime upgrades — rolling strategy keeps workloads running
- -Declarative — upgrade plans are Kubernetes resources managed via GitOps
- -Safe — drain and cordon prevent scheduling during upgrades
- -Automated — no SSH-ing into nodes to run upgrade scripts
How It Works
Step 1: Install the System Upgrade Controller
Step 2: Create Server Upgrade Plan
Step 3: Create Agent Upgrade Plan
Step 4: Apply and Monitor
Best Practices
- -Always upgrade server nodes before agent nodes (use prepare step)
- -Set concurrency to 1 for safe rolling upgrades
- -Test target version on a staging cluster first
- -Create an etcd snapshot before starting the upgrade
- -Use the channel field instead of version for automatic latest stable
Common Mistakes
- -Upgrading agents before servers (version skew issues)
- -Setting concurrency too high (multiple nodes down simultaneously)
- -Not testing the target version in staging first
- -Forgetting to snapshot etcd before upgrade (no rollback point)
- -Skipping minor versions (always upgrade incrementally)
FAQ
Discussion
Loading comments...