Day 2
Upgrade Talos
Move every node of one cluster to a new Talos release, one node at a time.
Before you start
Section titled “Before you start”- You have the kubeconfig of the management cluster.
- A person with
pk-metal-approvercan approve. That is you, if your site allows self-approval. If not, it is a second person. See Set up approval permissions. - The cluster is
Available. Each node isReady. - Talos accepts the new release from the release that each node runs. Talos v1.14 accepts an upgrade from v1.12 or later. The Talos project recommends one minor at a time.
- pk-metal upgrade refuses a downgrade.
- This pk-metal knows the new release. See Upgrade pk-metal first.
- Optional: a MaintenanceWindow covers the machines. A node outside its window waits.
How the rollout moves
Section titled “How the rollout moves”A Talos upgrade rollout
1 / 7
Ask
You set the new release. The operator proposes one TalosRollout with a plan. No machine changes.
pk-metal upgrade talos prod v1.14.7Ask. You set the new release. The operator proposes one TalosRollout with a plan. No machine changes.
pk-metal upgrade talos prod v1.14.7Approve. A person reads the plan and approves it. The approval names the plan hash.
pk-metal rollout approve prod-talosupgrade-1a2b3c4dFirst node. The first control plane drains, upgrades, reboots and becomes Ready. etcd must be healthy again.
drain → talosUpgrade → waitNodeReady → waitEtcdHealthy → uncordonPause. The rollout always stops after the first node. Examine the node, then resume.
pk-metal rollout resume prod-talosupgrade-1a2b3c4dControl planes. The other control planes follow, one at a time. The etcd leader goes last.
Workers. Then the workers. Between two nodes, the operator checks etcd and all Kubernetes nodes again.
Complete. Every node runs the new release. The rollout is Complete.
Upgrade pk-metal first
Section titled “Upgrade pk-metal first”pk-metal checks each Talos step against the Talos libraries in its build. A build knows the Talos releases up to its own Talos minor. For a newer minor, pk-metal upgrade and the rollout plan stop with the message upgrades to version … are not supported.
-
Read the Talos version of the libraries in the pk-metal release notes.
-
If the new Talos minor is newer, upgrade pk-metal first.
-
Ask for the new release. The command changes only the TalosCluster spec. It waits for the proposal and shows the plan.
Terminal window pk-metal upgrade talos prod v1.14.7The output names the rollout, for example
prod-talosupgrade-1a2b3c4d. -
Approve the plan. If your site forbids self-approval, ask a second person to approve it.
Terminal window pk-metal rollout approve prod-talosupgrade-1a2b3c4dThe rollout starts on the first control plane.
-
Monitor the first node.
Terminal window pk-metal rollout show prod-talosupgrade-1a2b3c4d -
Make sure that the first node runs the new release and is
Ready.Terminal window kubectl get talosnodesThe
VERSIONcolumn showsv1.14.7for the first node. -
Resume the rollout.
Terminal window pk-metal rollout resume prod-talosupgrade-1a2b3c4dThe other nodes follow, one at a time.
Verify
Section titled “Verify”pk-metal rollout show <rollout>showsComplete=True.pk-metal statusshows one version in theTALOS WANT/RUNcolumn of the cluster.- Each TalosNode has
VersionCurrent=True.
Stop or roll back
Section titled “Stop or roll back”- To stop before the next node:
pk-metal rollout pause <rollout>. - To stop for good:
pk-metal rollout abort <rollout>. A node that runs finishes. The other nodes areSkipped. - The operator does not downgrade Talos. pk-metal upgrade refuses a lower version.
Staged upgrades
Section titled “Staged upgrades”The rollout does not stage an upgrade. A TalosUpgrade action with stage: true writes the image and reboots the node at once. The upgrade runs early in the next boot. Talos does not drain the node in this mode, so put a drain action before it. Use it only when open files stop a normal upgrade.
If it fails
Section titled “If it fails”| What you see | Go to |
|---|---|
The rollout stops with RolloutFailed |
Operation failed |
Progressing shows WaitingForHealth for a long time |
Rollout paused or plan changed |
Complete=False with PlanChanged |
Rollout paused or plan changed |
| A drain does not end | Drain stuck |
| A node does not come back | Node not ready |
Related
Section titled “Related”- Upgrade Kubernetes
- TalosRollout, TalosUpgrade, pk-metal rollout
- mise run lab:upgrade runs this round in the virtual lab.