Prerequisites for Huawei Cloud Stack Workload Clusters
Meet the following before you create the cluster.
TOC
ProvidersCompute ValuesAlauda OS ImageImage ConfigMapNetwork ConnectivityControl Plane ELB AddressesImage RegistryHCS Credential SecretHCS Objects, Quota, and Node AddressesNode Labels and TaintsProviders
Install these cluster plugins on the global cluster:
- Alauda Container Platform Cluster Bootstrap Provider
- Alauda Container Platform Infrastructure Provider for Huawei Cloud Stack
A global cluster installed on Huawei Cloud Stack with ac already runs both. Otherwise, download them from ACP Common Aligned Extensions (see Download), upload them with violet push (see Upload Packages), and install them as described in Cluster Plugin. In a Global Cluster Disaster Recovery pair, install them on both global clusters.
Compute Values
In install-config.yaml, name the image, the flavors, and the availability zones of the nodes by their HCS API values, not by the display names in the tenant UI. The image is described below. For the flavors and zones, see HCS Objects, Quota, and Node Addresses. For the disks of each node group, see Disks.
Alauda OS Image
Upload to HCS the Alauda OS image that is published for the ACP release installed on the global cluster; see Downloading Alauda OS. Note the exact name you give the image when you upload it, because the cluster refers to the image by that name. The image architecture must match the architecture of the flavors. The image must carry the Kubernetes version that ac installs; see Kubernetes Version.
Image ConfigMap
Register each image with a ConfigMap on the global cluster when you upload it to HCS. Creating a cluster does not read these ConfigMaps; the platform upgrade does. ACP cannot discover the images in your HCS project, so the upgrade learns them only from these ConfigMaps. Create one ConfigMap per image. It records:
- the image name
- the ACP version whose Alauda OS image the image was made from
- the Kubernetes version and the etcd tag of that ACP version
The platform upgrade uses these ConfigMaps to find the image of each Kubernetes version. The ConfigMap of the image that a node group runs also tells the upgrade the architecture of that group. Every HCS cluster therefore needs them, including a cluster created with YAML. Before an upgrade, also register the image of every version on the upgrade path, as described in Stage the Alauda OS Images. In addition:
- Keep the ConfigMaps of earlier ACP versions.
- For each ACP version, register only one image per architecture.
- The
cpaas.io/hcs-vm-templatelabel value must match the image name in HCS.
In the generator, select every architecture whose images you register. Each generated ConfigMap records its architecture. Run ac config use-cluster global first, then the command that the generator prints.
Run the command on the global cluster. In a DR environment, run it on both global clusters: the ConfigMaps are not synchronized between them.
For each ACP version, register images of only one OS per architecture on a global cluster. When images of different OSes have the same Kubernetes version and architecture, an upgrade can move a cluster to the other OS.
ConfigMaps created from earlier versions of this document have no architecture key and no architecture in their name. Once the ConfigMaps of an ACP version exist for each architecture that you use, you can delete the earlier ConfigMaps of that version when no upgrade is in progress.
For each Kubernetes version, register the images of every architecture that your clusters use. In a cluster that mixes x86_64 and aarch64 node pools, every image ConfigMap must set architecture.
Check that the ConfigMap of your image exists. Run the following commands from a machine where ac is logged in to the platform:
If no ConfigMap lists your image name, create the ConfigMap of your image.
Network Connectivity
Allow the flows from the global cluster nodes and from the machine that runs ac to the HCS service and IAM endpoints. The endpoints are listed in Huawei Cloud Stack. Also allow the global cluster nodes to reach the control plane VIP, as listed in Workload Cluster VIP and Nodes.
Control Plane ELB Addresses
In the ELB subnets, reserve one free IPv4 address for the VIP, and exactly two free IPv4 addresses for each of the L4 and L7 Hybrid Load Balancing groups. See Control Plane Endpoint.
Image Registry
The cluster pulls its platform components either from the registry of the global cluster or from a dedicated registry. Choose the registry before you create the cluster; see Choose the Image Registry for a Workload Cluster.
HCS Credential Secret
An HCS credential Secret must exist in cpaas-system of the global cluster. Note how the Secret is used:
- The cluster refers to the Secret by name. Unlike the
globalcluster, it does not hold an inline credential. acnever creates or deletes the Secret.- One Secret can serve several clusters, and its name does not need to match the cluster name.
- Keep the Secret until every cluster that references it is deleted.
Write the credential file in an editor, not at a shell prompt, because the shell records the secret key in its history:
Write each line as key=value without quotes, because ac keeps quote characters as part of the value. A value may contain =. Only the first = on a line separates the key from the value. Create the Secret, then remove the file:
Do not create or update the Secret with ac apply, because it stores the secret key in the kubectl.kubernetes.io/last-applied-configuration annotation of the Secret. To change a value later, put the new value under stringData in a file, and run ac patch secret <credential-secret-name> -n cpaas-system --type=merge --patch-file=<file>.
HCS Objects, Quota, and Node Addresses
The following must exist in HCS. install-config.yaml names them by their HCS API values. ac creates none of them, and a wrong name stops the cluster creation; see Troubleshooting.
- The ECS flavors for the control plane and each worker node group. Name each flavor by its API name, not by its display name in the tenant UI. The flavor fixes the CPU and memory.
- The availability zones, if you name them. Use the zone's API name, not a display name. See Availability Zone Placement.
- A VPC, a security group, and every subnet that
install-config.yamlnames. The subnets are the node subnet and any subnet for the ELB, an additional NIC, or a node group. They belong to that VPC and let cluster nodes reach each other. The security group allows the node-to-node ports in Communication Matrix and the traffic from the ELB to the control plane nodes that is listed in Huawei Cloud Stack. - An EVS disk type named
SSD,SAS, orSATAfor the system and data disks. The type must be available in the target availability zone. - Quota for the instances, the EVS disks, the ELB, and the server group. Confirm it before you create the cluster.
Every node needs a free static IPv4 address in its subnet, one more address for each additional NIC, and a hostname. HCS nodes use static addresses only. Get the exact flavor and zone values from the HCS administrator, because the HCS tenant console might not show them.
Node Labels and Taints
To dedicate node pools to a purpose such as monitoring, logging, or ingress, plan their role labels and taints as described in Infra Nodes. install-config.yaml does not set them.