Creating Clusters on Huawei Cloud Stack
This document provides comprehensive instructions for creating Kubernetes clusters on the Huawei Cloud Stack platform using Cluster API.
TOC
Prerequisites1. Required Plugin Installation2. HCS Platform Preparation3. HCS CredentialsCluster Creation OverviewControl Plane ConfigurationConfigure HCS AuthenticationConfigure Machine Configuration PoolConfigure Machine TemplateConfigure KubeadmControlPlaneConfigure HCSClusterConfigure ClusterCluster VerificationUsing kubectlExpected ResultsAdding Worker NodesUpgrading ClustersPrerequisites
Before creating clusters, ensure all of the following prerequisites are met:
1. Required Plugin Installation
Install the following plugins on the 's global cluster:
- Alauda Container Platform Kubeadm Provider
- Alauda Container Platform HCS Infrastructure Provider
For detailed installation instructions, refer to the Installation Guide.
2. HCS Platform Preparation
Ensure the following HCS resources are configured:
- VPC: Virtual Private Cloud for network isolation
- Subnet: At least one subnet for VM deployment
- Security Group: Proper security group rules for cluster communication
3. HCS Credentials
Prepare HCS access credentials with the following information:
- AccessKey: HCS access key ID
- SecretKey: HCS access key
- ProjectID: HCS project ID
- Region: HCS region (e.g.,
cn-global-1) - ExternalGlobalDomain: HCS domain name
Cluster Creation Overview
At a high level, you'll create the following Cluster API resources in the 's global cluster to provision infrastructure and bootstrap a functional Kubernetes cluster.
Important Namespace Requirement
To ensure proper integration with the as business clusters, all resources must be deployed in the cpaas-system namespace. Deploying resources in other namespaces may result in integration issues.
The cluster creation process follows this order:
- Configure HCS authentication (Secret)
- Create machine configuration pool (HCSMachineConfigPool)
- Configure machine template (HCSMachineTemplate)
- Configure KubeadmControlPlane
- Configure HCSCluster
- Create the Cluster
Control Plane Configuration
The control plane manages cluster state, scheduling, and the Kubernetes API. This section shows how to configure a highly available control plane.
Configuration Parameter Guidelines
When configuring resources, exercise caution with parameter modifications:
- Replace only values enclosed in
<>with your environment-specific values - Preserve all other parameters as they represent optimized or required configurations
- Modifying non-placeholder parameters may result in cluster instability or integration issues
Configure HCS Authentication
HCS authentication information is stored in a Secret resource.
Configure Machine Configuration Pool
The HCSMachineConfigPool defines pre-configured hostnames and static IP addresses for VMs.
Pool Size Requirement
The configuration pool must include at least as many entries as the number of control plane nodes you plan to deploy.
Configure Machine Template
The HCSMachineTemplate defines the VM specifications for control plane nodes.
Storage Requirements
The following data disk mount points are recommended for control plane nodes:
/var/lib/etcd- etcd data (10GB+)/var/lib/kubelet- kubelet data (100GB+)/var/lib/containerd- container runtime data (100GB+)
*Required when dataVolumes is specified.
Configure KubeadmControlPlane
The KubeadmControlPlane defines the Kubernetes control plane configuration.
For component versions (DNS image tag, etcd image tag), refer to the OS Support Matrix.
Configure HCSCluster
The HCSCluster resource defines the HCS infrastructure configuration.
*Required when configuring VIP address.
Configure Cluster
The Cluster resource in Cluster API declares the cluster and references the control plane and infrastructure resources.
Cluster Verification
After deploying all cluster resources, verify that the cluster has been created successfully.
Using kubectl
Expected Results
A successfully created cluster should show:
- Cluster status: Running or Provisioned
- All control plane machines: Running
- Kubernetes nodes: Ready
- Cluster Module Status: Completed
Adding Worker Nodes
For instructions on adding worker nodes to the cluster, refer to Managing Nodes.
Upgrading Clusters
For instructions on upgrading cluster components, refer to Upgrading Clusters.