Upgrading Clusters on VMware vSphere
This document explains how to upgrade Kubernetes clusters on VMware vSphere after the platform-side distribution upgrade is complete. The documented workflow focuses on updating the control plane and worker nodes through Cluster API resources.
Where this page fits in the full ACP upgrade flow
This page covers only the Kubernetes step of the upgrade. The full ACP upgrade flow — including upgrade artifact synchronization, ACP Core upgrade through CVO, Aligned plugin upgrades, and Agnostic plugin upgrades from Marketplace — is documented in the ACP product documentation. Complete those steps before you start the Kubernetes step on this page:
- Upgrade Overview (scope and sequencing)
- Pre-Upgrade Preparation
- Upgrade the global cluster (Core, Aligned, Agnostic)
- Upgrade workload clusters (Core, Aligned, Agnostic)
Use this page when the same cluster runs on an immutable operating system, because the Kubernetes step on immutable OS replaces nodes from a new VM template rather than upgrading binaries in place.
TOC
Upgrade SequencePrerequisitesRequired Values From the OS Support MatrixStepsRecovering From a Failed Phase 2 UpgradeVerificationNext StepsUpgrade Sequence
Upgrade VMware vSphere clusters in the following order:
- (Prerequisite) Upgrade the ACP platform on the management cluster first. This brings the
cluster-api-provider-vspherecontroller and the related CAPI components to versions that understand the new schema. Trigger workload-cluster upgrades only after the management-side controllers have rolled out and become Ready. - Complete the distribution-version upgrade described in Upgrading Clusters.
- Verify that the control plane is healthy and the current cluster is stable.
- Upgrade Kube-OVN to the chart version required by the target ACP release and wait for the
AppReleaseto reachSuccess. - Upgrade the control plane Kubernetes version.
- Upgrade worker nodes to the target Kubernetes version.
Prerequisites
Before you begin, ensure the following conditions are met:
- The distribution-version upgrade is complete.
- The control plane is healthy and reachable.
- All nodes are in the
Readystate. - A current etcd backup has been taken and verified by using the supported ACP backup procedure.
- The target VM template is present in the vSphere environment under the same name as the Alauda OS Image Version value in the OS Support Matrix row. The upgrade fails if the template is not present when the new
VSphereMachineTemplateis applied. - For cross-version upgrades that span more than one Kubernetes minor, the intermediate-version Core images and VM templates are pre-staged. See Cross-Version Upgrade Preparation.
- The target Kubernetes version is compatible with your workloads and add-ons.
- The machine config pools have enough capacity for rolling updates.
- If you rely on pool-managed persistent disks, keep
KubeadmControlPlane.spec.rolloutStrategy.rollingUpdate.maxSurge: 0and eachMachineDeployment.spec.strategy.rollingUpdate.maxSurge: 0so the replacement can reuse the same slot and disk identity. - Review the Kubernetes upgrade path and version skew policy.
Disk Preservation Model
Upgrades rely on Cluster API's rolling replacement mechanism. Each cluster has four disk classes; only the pool-managed class survives a delete-recreate.
"Preserved" means the same disk identity is reattached — it does not mean the disk's contents are time-traveled. Anything written to a pool-managed disk during the upgrade window stays after the upgrade and stays after a rollback.
Templates Cannot Be Modified In Place
VSphereMachineTemplate.spec.template.spec is immutable. The vSphere admission webhook rejects any update with the message "VSphereMachineTemplate spec.template.spec field is immutable. Please create a new resource instead." Every upgrade step on this page therefore creates a new VSphereMachineTemplate with a new metadata.name, applies it, and then patches the controlling resource's infrastructureRef.name to the new template. Keep the previous template until the new rollout is healthy in case rollback is required.
Fleet Essentials boundary
Fleet Essentials 1.0.4 and later can request the ACP 4.3-and-later Distribution Version upgrade through CVO. It does not perform the vSphere Kubernetes and Alauda OS replacement described on this page. Complete Phase 1 with the ACP workflow, then use the YAML procedure below for Phase 2.
Required Values From the OS Support Matrix
The authoritative mapping between an ACP release, its VM template, the Kubernetes version, the matching CoreDNS, etcd, and Kube-OVN versions lives in OS Support Matrix. Locate the row that corresponds to the target ACP version before you start; the row supplies every value the steps below need.
The cells you read from that row map to the upgrade manifests as follows:
The CoreDNS and etcd image tags are control-plane-only because clusterConfiguration is a KubeadmControlPlane field. Worker nodes inherit container image versions from the new VM template; the MachineDeployment does not carry its own dns/etcd tags. The Kube-OVN annotation lives on the Cluster resource, not on KubeadmControlPlane, because the vSphere provider watches it independently of the Kubernetes control plane rollout.
Steps
Upgrade Kube-OVN Before the Control Plane
Follow Upgrade Kube-OVN Before the Control Plane and select the VMware vSphere procedure that matches the installed provider version. The shared procedure includes the vSphere-specific network annotation check, the chart-name migration at Kube-OVN v4.4, the legacy-provider boundary, and the required AppRelease health checks.
For a Kube-OVN v4.4+ target, upgrade the vSphere provider to v1.0.16 or later first. Do not patch the chart source manually with an earlier provider because its controller can reconcile the legacy chart name back over the change.
Create the target machine templates
Before you start the rolling upgrade, create new VSphereMachineTemplate resources for the control plane and workers.
-
Export the existing control plane template
-
Modify the control plane template
Edit
new-cp-template.yaml:- Set
metadata.nameto a new unique name (for example,<cluster_name>-control-plane-v2) - Update
spec.template.spec.templateto the target VM template name - Update CPU, memory, or disk settings if needed
- Remove server-generated fields:
metadata.resourceVersion,metadata.uid,metadata.generation,metadata.creationTimestamp,metadata.managedFields,metadata.annotations["kubectl.kubernetes.io/last-applied-configuration"], andstatus - Leave
spec.template.spec.providerIDunset. The vSphere provider setsproviderIDto the VM's BIOS UUID once the VM is created; pre-filling it in the template breaks the controller's identity binding.
- Set
-
Export and modify the worker template
Edit
new-worker-template.yaml:- Set
metadata.nameto a new unique name (for example,<cluster_name>-worker-v2) - Update
spec.template.spec.templateto the target VM template name - Update CPU, memory, or disk settings if needed
- Remove the same server-generated fields listed above
- Set
-
Apply both new templates
Upgrade the control plane
Before you start, complete the shared Upgrade Kube-OVN Before the Control Plane procedure and verify that the cni-kube-ovn AppRelease is at the target revision with phase=Success. Then collect every required control-plane value from the target ACP row in the OS Support Matrix as described in Required Values From the OS Support Matrix.
-
Patch the
KubeadmControlPlanewith the target Kubernetes valuesUpdate the
KubeadmControlPlaneresource in a single edit to keepspec.version, the CoreDNS image tag, the etcd image tag, and the infrastructure template reference consistent with the same VM template:-
spec.version← Kubernetes Version from the OS Support Matrix row -
spec.kubeadmConfigSpec.clusterConfiguration.dns.imageTag← coredns column from the same row -
spec.kubeadmConfigSpec.clusterConfiguration.etcd.local.imageTag← etcd column from the same row -
spec.machineTemplate.infrastructureRef.name← the newVSphereMachineTemplatename created above -
When the target is Kubernetes 1.35 or later, update
/etc/kubernetes/patches/kubeletconfiguration0+strategic.jsoninspec.kubeadmConfigSpec.filesin this same edit, as described in Required kubelet patch for Kubernetes 1.35
Updating only
spec.versionis not sufficient. The CoreDNS and etcd image tags must move together with the Kubernetes version because they are built from the same release; leaving them at the previous values can result in CoreDNS and etcd pods that do not match the new Kubernetes minor version. -
-
Monitor the control plane rollout
Upgrade the worker nodes
After the control plane upgrade completes, update the MachineDeployment to reference the new worker template and the target Kubernetes version.
Typical changes include:
spec.template.spec.version— the target Kubernetes versionspec.template.spec.infrastructureRef.name— the newVSphereMachineTemplatenamespec.template.spec.bootstrap.configRef.name— the newKubeadmConfigTemplatename. This is required for Kubernetes 1.35 or later so the worker receives the required kubelet patch; for earlier versions, change it only when other bootstrap settings must change. See Updating Bootstrap Templates.
Apply the changes:
The following command includes the bootstrap reference required for Kubernetes 1.35 or later. For an earlier target with no bootstrap change, omit the bootstrap object.
Monitor the worker rollout:
Recovering From a Failed Phase 2 Upgrade
Do not treat a Kubernetes minor downgrade as an ordinary rollback. Choose the recovery path from the rollout stage:
- No target-version control-plane
Machinehas been created: restore the previous Kube-OVN annotation and the previousKubeadmControlPlaneandMachineDeploymentmanifest values. This cancels the target rollout before a new control-plane data format is introduced. - Only the machine template or OS image changed, and the Kubernetes minor did not change: point the controlling resource back to the previous template. Cluster API performs another replacement rollout. Keep the Kubernetes minor unchanged.
- A control-plane
Machineon the target Kubernetes minor has joined the cluster: do not patch Kubernetes, CoreDNS, or etcd back to the previous minor. Stop further rollout, repair forward on the target minor, or restore the cluster from the verified pre-upgrade backup by using the supported ACP recovery procedure.
If a target-minor control-plane Machine was created but never joined, first restore healthy etcd quorum and determine whether the failed replacement can be removed safely. Do not assume that changing the version fields alone is sufficient.
Keep these infrastructure facts in mind during any recovery:
- The old VMs are gone. They were destroyed during the upgrade. Template recovery builds a fresh set of replacement machines; it does not restore the original VMs.
- The old
VSphereMachineTemplateresource must still exist. Do not delete the previous template until the new rollout is healthy. If you already deleted it, recreate it from version control or backup before attempting same-minor template recovery. - Pool-managed disk identity is preserved, but data state is not. Disks declared in
VSphereMachineConfigPool.spec.configs[].persistentDisks[]reattach to the replacement machines at the same slot, but data written during the upgrade window remains on those disks.
For stage 1, use the vSphere rule in Restore Kube-OVN During Stage-1 Recovery. Both current and legacy vSphere providers restore from the annotation, but the shared rule preserves the chart-version and provider-version boundary. Wait until the restored AppRelease passes the shared verification before changing control-plane manifests.
The KubeadmControlPlane controller can block replacement while etcd is unhealthy. Recover quorum before retrying any safe replacement action.
Verification
Confirm the following results after the upgrade:
KubeadmControlPlanereaches the target version and desired replica count.MachineDeploymentreaches the target version and desired replica count.- Control plane and worker nodes return to the
Readystate. - The vSphere CPI daemonset remains available in the workload cluster.
Next Steps
After the Kubernetes upgrade is complete, continue with routine node operations in Managing Nodes on VMware vSphere.