Upgrading Clusters on Huawei DCS
This guide explains how to complete Phase 2 of the upgrade workflow for clusters on Huawei DCS. Before you upgrade Kubernetes, complete the Distribution Version upgrade described in Upgrading Clusters.
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 Alauda OS-based VM template rather than upgrading binaries in place.
Version
DCS provider v1.0.16 is the first release that supports pool-managed persistent disks.
Alauda OS and Provider Compatibility
Before selecting the target provider package and VM template, review Alauda OS and Provider Compatibility.
Existing Cluster Migration
If your cluster runs ACP v4.2.1 or later and you are moving to DCS provider v1.0.16 or later, complete the migration procedure in Migrate Existing Huawei DCS Clusters to Pool-Managed Persistent Disks before you rely on upgrade-time disk preservation.
TOC
Upgrade SequencePrerequisitesUsing YAMLRequired Values From the OS Support MatrixUpgrade Kube-OVN Before the Control PlaneUpgrade Control Plane InfrastructureProcedureUpgrade Control Plane Kubernetes VersionProcedureUpgrade Worker NodesProcedureRecovering From a Failed Phase 2 UpgradeFleet Essentials BoundaryAdditional ResourcesUpgrade Sequence
Upgrade DCS clusters in the following order:
- (Prerequisite) Upgrade the ACP platform on the management cluster first. This brings the cluster-api-provider-dcs controller and the related CAPI components (core, KubeadmControlPlane provider, bootstrap provider) to versions that understand the new schema. Trigger workload-cluster upgrades only after the management-side controllers have rolled out and become Ready.
- Upgrade the Distribution Version (Aligned Extensions) on the workload cluster. See Upgrading Distribution Version.
- 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.
Cluster API orchestrates rolling updates with built-in safety mechanisms to reduce service disruption.
Skipping step 1 risks two failure modes: the old controller silently ignores new schema fields written to DCSIpHostnamePool / DCSMachineTemplate; or a controller image swap mid-rollout interrupts persistent-disk state-machine progression. Always settle the management-side upgrade before touching workload rollout.
Prerequisites
Before you start, ensure all of the following prerequisites are met:
- The Distribution Version upgrade is complete
- The control plane is reachable
- All nodes are healthy and in Ready state
- A current etcd backup has been taken and verified by using the supported ACP backup procedure
- The IP Pool has sufficient capacity for rolling updates
- The VM template supports the target Kubernetes version. See OS Support Matrix for version mapping
- 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
- DCS VM templates are
4.2.1or later if you use pool-managed persistent disks, because safe shutdown and disk detach depend on guest tools - If you rely on pool-managed persistent disks, keep
KubeadmControlPlane.spec.rolloutStrategy.rollingUpdate.maxSurge = 0and eachMachineDeployment.spec.strategy.rollingUpdate.maxSurge = 0 - If the cluster uses additional NICs, keep the required
DCSIpHostnamePool.spec.pool[].additionNic[]entries in place and confirm that the DCS DVS and Port Groups are reachable from the hosts that may receive replacement VMs
Disk Preservation Model
Upgrades rely on Cluster API's rolling update 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.
Pool-managed preservation requires one-by-one replacement, so keep maxSurge = 0 on both KubeadmControlPlane.spec.rolloutStrategy.rollingUpdate and MachineDeployment.spec.strategy.rollingUpdate.
If your existing cluster still keeps preserved data in the old template-disk layout, migrate it first by following Migrate Existing Huawei DCS Clusters to Pool-Managed Persistent Disks.
Additional NICs During Rolling Replacement
Additional NICs are declared in DCSIpHostnamePool.spec.pool[].additionNic[], not in DCSMachineTemplate. During an upgrade, each replacement VM uses the additional NICs from the Pool slot it claims. The upgrade template steps below should not move additional NIC settings into DCSMachineTemplate.
Templates Cannot Be Modified In Place
DCSMachineTemplate is a Cluster API infrastructure template. Cluster API only triggers rolling replacement when KubeadmControlPlane.spec.machineTemplate.infrastructureRef.name or MachineDeployment.spec.template.spec.infrastructureRef.name points at a different template name. Editing the existing template in place changes the manifest but does not produce a new rollout — the running VMs continue to use the in-memory snapshot of the previous template.
Every upgrade step on this page therefore creates a new DCSMachineTemplate with a new metadata.name, applies it, and then patches the controlling resource's infrastructureRef.name to the new template. The previous template should be kept until the new rollout is healthy in case rollback is required.
Using YAML
YAML-based upgrades do not depend on Fleet Essentials.
Required Values From the OS Support Matrix
The authoritative mapping between an ACP release, its Alauda OS image, 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 YAML 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 DCS provider watches it independently of the Kubernetes control plane rollout.
Confirm with the cluster's platform owner that the target Alauda OS image has already been uploaded to the DCS platform under the same name as the Alauda OS Image Version value in the matrix row. The upgrade fails if that VM template is not present on DCS when the DCSMachineTemplate is applied.
Upgrade Kube-OVN Before the Control Plane
Follow Upgrade Kube-OVN Before the Control Plane and select the Huawei DCS procedure that matches the installed DCS provider version. That shared procedure owns the provider version boundary, the Kube-OVN chart-name migration at v4.4, legacy behavior, and the required AppRelease health checks.
Do not use the legacy direct targetRevision patch for a Kube-OVN v4.4+ target. Upgrade the DCS provider to v1.0.22 or later first so it can reconcile the complete source and the related component repository changes.
Upgrade Control Plane Infrastructure
Upgrading the control plane machine template lets you roll out updated VM specifications, system patches, and infrastructure settings.
Procedure
-
Create an updated machine template
Copy the existing
DCSMachineTemplatereferenced byKubeadmControlPlaneand save it as a new file: -
Modify the template specifications
Update the new template as needed:
- Set
metadata.nameto<new-template-name> - Update
spec.template.spec.vmTemplateName - Update
spec.template.spec.vmConfig.dcsMachineCpuSpec.quantity - Update
spec.template.spec.vmConfig.dcsMachineMemorySpec.quantity - Update
spec.template.spec.vmConfig.dcsMachineDiskSpecfor system and template-local disks only - Strip server-generated metadata (
resourceVersion,uid,generation,creationTimestamp,managedFields,kubectl.kubernetes.io/last-applied-configurationannotation) and the entirestatusfield from the copied manifest. - Leave
spec.template.spec.providerIDunset. The DCS provider setsproviderIDtodcs://<machine-name>once the VM is created; pre-filling it in the template breaks the controller's identity binding.
Keep pool-managed persistent disks, including
/var/cpaas, inDCSIpHostnamePool.spec.pool[].persistentDisk. Keep additional NICs inDCSIpHostnamePool.spec.pool[].additionNic[]. - Set
-
Apply the updated template
-
Update the control plane reference
Modify the
KubeadmControlPlaneresource to reference the new template: -
Monitor the rolling update
Upgrade Control Plane Kubernetes Version
Upgrading the control plane Kubernetes version on immutable OS is a delete-recreate workflow. The control plane VMs are replaced one by one from a new DCSMachineTemplate that points at the target Alauda OS VM template, and the KubeadmControlPlane resource is patched to carry the matching Kubernetes version, CoreDNS image tag, and etcd image tag.
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.
Procedure
-
Create a new
DCSMachineTemplatefor the target Kubernetes versionCopy the existing control-plane template and update
metadata.nameto a new name andspec.template.spec.vmTemplateNameto the Alauda OS Image Version value read from the target row in the OS Support Matrix. Keep pool-managed persistent disks inDCSIpHostnamePool.spec.pool[].persistentDiskand additional NICs inDCSIpHostnamePool.spec.pool[].additionNic[]rather than reintroducing them as template fields. -
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 Alauda OS release:-
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 newDCSMachineTemplatename created in step 1 -
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 Alauda OS 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 rolling update
KubeadmControlPlane.spec.rolloutStrategy.rollingUpdate.maxSurgemust remain0when the cluster relies on pool-managed persistent disks, so the control plane VMs are replaced one at a time.
Upgrade Worker Nodes
Worker node Kubernetes upgrades are managed through MachineDeployment resources. Worker upgrades carry fewer fields than the control plane: the CoreDNS and etcd image tags are part of KubeadmControlPlane.spec.kubeadmConfigSpec.clusterConfiguration, which MachineDeployment does not have. Worker nodes inherit Kubernetes component versions from the new VM template; the MachineDeployment only needs the target Kubernetes version and the new template reference.
Before you start, read the Alauda OS Image Version and Kubernetes Version cells from the target ACP row in the OS Support Matrix as described in Required Values From the OS Support Matrix.
Procedure
-
Create a new
DCSMachineTemplatefor worker nodes- Create a new
DCSMachineTemplatewith avmTemplateNameset to the Alauda OS Image Version value from the target row in the OS Support Matrix - Keep
/var/cpaasand any other upgrade-preserved disks inDCSIpHostnamePool.spec.pool[].persistentDiskrather than reintroducing them as template disks - Keep additional NICs in
DCSIpHostnamePool.spec.pool[].additionNic[]
- Create a new
-
Update the
MachineDeployment- Set
spec.template.spec.versionto the Kubernetes Version value from the same OS Support Matrix row - Set
spec.template.spec.infrastructureRef.nameto the newDCSMachineTemplatename created in step 1 - When the target is Kubernetes 1.35 or later, create a new
KubeadmConfigTemplatecontaining the required kubelet patch and setspec.template.spec.bootstrap.configRef.nameto that template in the same edit; for earlier versions, update the bootstrap reference only when other bootstrap changes are required
- Set
-
Monitor the rolling update
- Verify that the rolling update completes successfully
- Verify that the new worker nodes join the cluster with the target Kubernetes version
MachineDeployment.spec.strategy.rollingUpdate.maxSurgemust remain0when the cluster relies on pool-managed persistent disks, so the worker nodes are replaced one at a time.
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 state 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
DCSMachineTemplateresource 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
DCSIpHostnamePool.spec.pool[].persistentDiskreattach to the replacement machines at the same IP slot, but data written during the upgrade window remains on those disks.
For stage 1, use the DCS rule in Restore Kube-OVN During Stage-1 Recovery. The recovery action depends on the installed provider version: current providers restore the complete source from the annotation, while legacy providers require the earlier-chart revision patch. 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.
Fleet Essentials Boundary
Fleet Essentials 1.0.4 and later can request the ACP 4.3-and-later Distribution Version upgrade through CVO. That is Phase 1 of this guide. Fleet Essentials does not perform the DCS Kubernetes and Alauda OS replacement in Phase 2, and it does not manage DCSIpHostnamePool.spec.pool[].persistentDisk. Use the YAML procedure on this page for the complete Phase 2 rollout.
Cluster creation and routine node-pool management through Fleet Essentials are outside this upgrade limitation.