Managing Nodes on Huawei Cloud Stack
This document explains how to manage worker nodes using Cluster API Machine resources on the Huawei Cloud Stack platform.
TOC
PrerequisitesOverviewWorker Node DeploymentStep 1: Configure Machine Configuration PoolStep 2: Configure Machine TemplateStep 3: Configure Bootstrap TemplateStep 4: Configure Machine DeploymentNode Management OperationsScaling Worker NodesAdding Worker NodesRemoving Worker NodesUpgrading Machine InfrastructureUpgrading Kubernetes VersionVerificationTroubleshootingViewing 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.
Configuration Guidelines When working with the configurations in this document:
- Only modify values enclosed in
<>brackets - Replace placeholder values with your environment-specific settings
- Preserve all other default configurations unless explicitly required
Overview
Worker nodes are managed through Cluster API Machine resources, providing declarative and automated node lifecycle management. The deployment process involves:
- 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
Worker Node Deployment
Step 1: Configure Machine Configuration Pool
The HCSMachineConfigPool defines the network configuration for worker node VMs. You must plan and configure the IP addresses, hostnames, and other network parameters before deployment.
Pool Size Requirement
The pool must include at least as many entries as the number of worker nodes you plan to deploy. Insufficient entries will prevent node deployment.
Step 2: Configure Machine Template
The HCSMachineTemplate defines the VM specifications for worker nodes.
Required Disk Configurations
The following disk mount points are recommended for worker nodes:
- System volume (
systemVolume: true) /var/lib/kubelet- Kubelet data directory/var/lib/containerd- Container runtime data/var/cpaas- Platform-specific data
You may add additional disks, but these essential configurations must be preserved.
*Required when dataVolumes is specified.
Step 3: Configure Bootstrap Template
The KubeadmConfigTemplate defines the bootstrap configuration for worker nodes.
Step 4: Configure Machine Deployment
The MachineDeployment orchestrates the creation and management of worker nodes.
Node Management Operations
This section covers common operational tasks for managing worker nodes.
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 IP configurations to the pool for the additional nodes.
Modify the pool to include new IP entries, then apply:
-
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 nodes and their associated disks. 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
Upgrading Machine Infrastructure
To upgrade worker machine specifications (CPU, memory, disk, VM image), follow these steps:
-
Create New Machine Template
Copy the existing
HCSMachineTemplateand modify the required values:-
imageName- VM image -
flavorName- Instance type -
rootVolume.size- System disk size -
dataVolumes- Data disk configurations
-
-
Deploy New Template
-
Update Machine Deployment
Modify the
MachineDeploymentto reference the new template: -
Monitor Rolling Update
Upgrading Kubernetes Version
Kubernetes version upgrades require coordinated updates to both the MachineDeployment and the underlying VM template.
Version Compatibility
Ensure the VM template's Kubernetes version matches the version specified in the MachineDeployment. Mismatched versions will cause node join failures.
Procedure:
-
Update Machine Template
Create a new
HCSMachineTemplatewith an updatedimageNamethat supports the target Kubernetes version. -
Update MachineDeployment
Modify the following fields:
-
spec.template.spec.version- Target Kubernetes version -
spec.template.spec.infrastructureRef.name- New machine template name
-
-
Monitor Upgrade
Verify that new nodes join the cluster with the correct Kubernetes version:
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