Manage Nodes on Huawei Cloud Stack
This document explains how to manage worker nodes using Cluster API Machine resources on the Huawei Cloud Stack platform.
To upgrade the Kubernetes version of the nodes, see Upgrade Kubernetes on Huawei Cloud Stack.
TOC
PrerequisitesOverviewUsing the Web UIViewing Node PoolsAdding a Worker Node PoolManaging Node IP AddressesDeleting a Worker Node PoolUsing YAMLScaling Worker NodesAdding Worker NodesRemoving Worker NodesChanging Machine InfrastructureUpdating Bootstrap TemplatesVerificationTroubleshootingViewing Controller LogsCommon IssuesPrerequisites
Important Prerequisites
- The control plane must be deployed before performing node operations. See Create Cluster for setup instructions.
- Ensure you have proper access to the HCS platform and required permissions.
- To manage the nodes of the
globalcluster itself, the provider must be installed onglobalfirst; see Manage Nodes on Alauda OS Clusters.
When using the YAML examples in this document, replace only values enclosed in <> with environment-specific values. Preserve the remaining fields unless your cluster policy requires a different value.
Overview
Worker nodes are managed through Cluster API Machine resources, providing declarative and automated node lifecycle management. A worker node pool is built from four resources:
- Machine Configuration Pool - Network settings for worker nodes
- Machine Template - VM specifications
- Bootstrap Configuration - Node initialization settings
- Machine Deployment - Orchestration of node creation and management
You can manage these resources through the web UI or with YAML manifests. The web UI provides a guided experience and requires Fleet Essentials; YAML works without it.
Using the Web UI
Requirement: This workflow requires Fleet Essentials 1.0.2 or later. Without it, manage node pools with the YAML workflows in the Using YAML section.
The Node Pools tab lets you view the control plane and worker node pools, add or delete worker node pools, and edit the reserved IP addresses of an existing pool.
Navigation: Clusters → Clusters → Select cluster → Node Pools tab
Viewing Node Pools
The Node Pools tab shows the Control Plane Node Pool and each Worker Node Pool as a card. Both card types share the same fields:
Adding a Worker Node Pool
Click Add Worker Node Pool and complete the dialog. The fields match Step 5 of the creation wizard: pool name (prefixed with <cluster-name>-), Flavor, Availability Zone, Machine Configs (hostname, networks, persistent disks), System Disk, Data Volumes, Replicas, Rollout Strategy, and SSH Authorized Keys. New nodes appear in the Nodes tab after the pool is created.
The selected Availability Zone applies to every node in the new worker pool. To place worker nodes in another zone, create a separate worker pool and select that zone; one pool does not automatically spread its replicas across zones. The dropdown disables zones that HCS reports as unavailable. See Availability Zone Placement for automatic selection, persistent disk, and control plane placement constraints.
Managing Node IP Addresses
Each node in an HCS pool uses a reserved static IP address from its subnet. To change which addresses a pool reserves — for example, to add capacity before scaling the pool up — open the pool card's action menu and select Update Config Pool to open the Manage IPs dialog.
The dialog edits the machine configurations of the pool's HCSMachineConfigPool. For each node you can set the hostname, the networks (each an IP address chosen from its subnet, plus the subnet), and the persistent disks. IP selection follows the same rules as the creation wizard: choose the subnet first, then pick an assignable address from the list; addresses already in use are not offered.
HCS clusters use static IP addresses with no DHCP. Reserve enough addresses in the pool before you scale a node pool up — a new node cannot start unless the pool provides an address for it.
Deleting a Worker Node Pool
Open the Worker Node Pool card's action menu, select Delete, and confirm.
Deleting a worker node pool permanently removes all of its nodes and the underlying ECS instances. Ensure workloads can tolerate the loss of these nodes through proper replication. The Control Plane Node Pool cannot be deleted.
Using YAML
Manage worker nodes with Cluster API manifests. To add another worker node pool with YAML, follow Deploy Worker Nodes on the cluster creation page.
Scaling Worker Nodes
Worker node scaling allows you to adjust cluster capacity based on workload demands.
Adding Worker Nodes
Increase the number of worker nodes to handle increased workload.
Procedure:
-
Check Current Node Status
-
Extend Configuration Pool
Add new machine configurations to the pool for the additional nodes. If the new workers need preserved node-local state such as
/var/cpaas, include the matchingpersistentDisks[]entries in each new configuration.Modify the pool to include new IP entries, then apply:
When you edit the pool, keep all existing
configs[]entries and their acceptedpersistentDisks[]entries unchanged unless you are intentionally appending a new disk slot. -
Scale Up the MachineDeployment
Update the
replicasfield to the desired number of nodes: -
Monitor the Scaling Progress
Removing Worker Nodes
Decrease the number of worker nodes to reduce cluster capacity.
Data Loss Warning
Scaling down removes worker nodes and their ECS instances. Template-owned dataVolumes[] are not preserved. Pool-managed persistent disks declared in HCSMachineConfigPool.spec.configs[].persistentDisks[] remain tracked by the pool and can be reused while the corresponding hostname entry stays in the pool. Ensure:
- Workloads can tolerate node loss through proper replication
- No critical data is stored only on the nodes being removed
- Applications are designed for horizontal scaling
Procedure:
-
Scale Down the MachineDeployment
-
Monitor the Removal Progress
The Cluster API controller will:
- Drain the selected nodes (evict pods if possible)
- Delete the underlying VMs from the HCS platform
- Remove the machine resources
Changing Machine Infrastructure
To change worker machine specifications (CPU, memory, disk, VM image), create a new machine template and point the MachineDeployment at it. The worker nodes are then replaced one by one. Follow these steps:
Note: HCS dataVolumes[] are not preserved during replacement. To preserve node-local state such as /var/cpaas, declare it in HCSMachineConfigPool.spec.configs[].persistentDisks[] before the rollout and keep MachineDeployment.spec.strategy.rollingUpdate.maxSurge: 0. If your cluster still keeps these disks in HCSMachineTemplate.spec.template.spec.dataVolumes[], first complete Migrate Existing Huawei Cloud Stack Clusters to Pool-Managed Persistent Disks.
-
Create New Machine Template
Copy the existing
HCSMachineTemplateand modify the required values:imageName- VM imageflavorName- Instance typerootVolume.size- System disk sizedataVolumes- Temporary data disk configurations
If you need to add a new pool-managed persistent disk, append it to the worker
HCSMachineConfigPoolfirst. The provider creates or claims the EVS disk, but the running ECS does not mount it until this rolling replacement creates a replacement worker.Then edit
new-template.yamlbefore applying:- Change
metadata.nameto<new-template> - Leave runtime identity fields unset, including
spec.template.spec.providerIDandspec.template.spec.serverId - Remove server-generated fields such as:
metadata.resourceVersionmetadata.uidmetadata.creationTimestampmetadata.managedFieldsstatus
-
Deploy New Template
-
Update Machine Deployment
Modify the
MachineDeploymentto reference the new template: -
Monitor Rolling Update
To change the machine specification of control plane nodes, use the same steps and patch KubeadmControlPlane.spec.machineTemplate.infrastructureRef.name instead.
Updating Bootstrap Templates
To change the bootstrap configuration of worker nodes (for example kubelet settings or the commands that run when a node joins), create a new KubeadmConfigTemplate and point the MachineDeployment at it. Modifying an existing template in place does not roll out existing machines; only newly created machines pick up the change.
-
Export the Existing Template
-
Modify the Template
Edit
new-bootstrap-template.yaml:- Set
metadata.nameto a new unique name,<new-bootstrap-template> - Remove server-generated metadata (
resourceVersion,uid,creationTimestamp,managedFields, thekubectl.kubernetes.io/last-applied-configurationannotation) and the entirestatusfield - Edit the fields you want to change. Keep the existing entries of the kubelet patch file
/etc/kubernetes/patches/kubeletconfiguration0+strategic.json, including the certificate paths, and change only what you need - For Kubernetes 1.35 or later, add the required kubelet patch settings to that file
- Set
-
Apply the New Template
-
Update the MachineDeployment
The rolling replacement of the worker nodes then starts:
Verification
After deploying worker nodes, verify the deployment:
Troubleshooting
Viewing Controller Logs
Common Issues
Node fails to join cluster
- Verify the VM template matches the Kubernetes version
- Check network connectivity between nodes
- Ensure the configuration pool has available entries
Machine stuck in provisioning
- Check HCS platform for resource availability
- Verify credentials and permissions
- Review controller logs for error messages