Day 2
Upgrade Kubernetes
Move the control plane, kube-proxy and the kubelets of one cluster to a new Kubernetes version.
Before you start
Section titled “Before you start”- The Talos release of the cluster supports the new version. pk-metal upgrade refuses a version that it does not support.
- The new version has the same minor as the current version, or the next minor. pk-metal upgrade and the rollout plan refuse a skipped minor and a downgrade. To go from v1.34 to v1.36, do two upgrades.
- 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.
The order
Section titled “The order”- The control planes, one at a time. Each gets new API server, controller manager, scheduler and kubelet images.
- The kube-proxy DaemonSet. The rollout waits until each kube-proxy pod runs the new image.
- The workers. Each gets a new kubelet image.
A node reboots only if Talos says that the change needs it.
What the rollout does not update
Section titled “What the rollout does not update”The rollout does not update the bootstrap manifests in the machine config: CoreDNS, Flannel and other CNI manifests. Talos creates these objects once and does not change an object that exists. They stay at the old version.
-
List the manifests that Talos rendered on a control plane.
Terminal window talosctl -n <control-plane> get manifests -
Find the versions that the new Kubernetes minor needs, in the release notes of CoreDNS and of your CNI.
-
Update CoreDNS and the CNI with the tool that you use for workloads.
-
Ask for the new version.
Terminal window pk-metal upgrade kubernetes prod v1.36.3The output names the rollout, for example
prod-kubernetesupgrade-9c8d7e6f. -
Approve it. If your site forbids self-approval, ask a second person to approve it.
Terminal window pk-metal rollout approve prod-kubernetesupgrade-9c8d7e6f -
After the first control plane, examine it.
Terminal window kubectl --kubeconfig prod.kubeconfig get nodes -
Resume the rollout.
Terminal window pk-metal rollout resume prod-kubernetesupgrade-9c8d7e6f
Verify
Section titled “Verify”- The TalosCluster has
VersionsCurrent=True. - pk-metal status shows one version in the
K8S WANT/RUNcolumn of the cluster.
If it fails
Section titled “If it fails”| What you see | Go to |
|---|---|
PlanChanged after a second edit of the version |
Rollout paused or plan changed |
The rollout waits with WaitingForHealth |
Rollout paused or plan changed |
| A node fails | Operation failed |
Related
Section titled “Related”- Upgrade Talos uses the same commands.
- TalosRollout, pk-metal rollout