Prerequisites for Huawei DCS Workload Clusters

Meet the following before you create the cluster.

Providers

Install these cluster plugins on the global cluster:

  • Alauda Container Platform Cluster Bootstrap Provider
  • Alauda Container Platform Infrastructure Provider for Huawei DCS

A global cluster installed on Huawei DCS 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.

VM Template and Kubernetes Version

Create a VM template on DCS from the Alauda OS image that is published for the ACP release installed on the global cluster. Use the image without changes; see Downloading Alauda OS. Note which Alauda OS variant the template runs: M55, KO, or KU. A KO or KU template needs provider.dcs.osType: alaudaos-k.

VM Template ConfigMap

Register each VM template with a ConfigMap on the global cluster when you create the template. Create one ConfigMap per VM template. It records:

  • the VM template name
  • the ACP version whose Alauda OS image the VM template was made from
  • the Kubernetes version and the etcd tag of that ACP version

When you create a cluster, ac reads kubernetesVersion and etcdTag from the ConfigMap of the template. The platform upgrade uses these ConfigMaps to find the VM template of each Kubernetes version, and the ConfigMap of the template that a node group runs tells the upgrade the architecture of that group; see Stage the Alauda OS Images. The cpaas.io/dcs-vm-template label value must match the VM template name on DCS.

In the generator, select every architecture whose VM templates you register. Each generated ConfigMap records its architecture. Run ac config use-cluster global first, then the command that the generator prints.

Architectures
v4.5.1 · Kubernetes v1.36.4-acp.4
ac apply -f - <<'EOF'
apiVersion: v1
kind: ConfigMap
metadata:
  name: dcs-vm-template-m55-x86-64-v4.5.1
  namespace: cpaas-system
  labels:
    cpaas.io/dcs-vm-template: "<vm-template-name-for-x86_64>"
    cpaas.io/distribution-version: "v4.5.1"
data:
  kubernetesVersion: "v1.36.4-acp.4"
  etcdTag: "v3.6.13-acp.6"
  architecture: "x86_64"
EOF

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 VM templates of only one OS per architecture on a global cluster. When VM templates 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 VM templates of every architecture that your clusters use. In a cluster that mixes x86_64 and aarch64 node pools, every VM template ConfigMap must set architecture.

Check that the ConfigMap of your template exists. Run the following commands from a machine where ac is logged in to the platform:

ac config use-cluster global
ac -n cpaas-system get cm -l cpaas.io/dcs-vm-template -L cpaas.io/dcs-vm-template

If no ConfigMap lists your VM template name, create the ConfigMap of your template.

You do not set the Kubernetes or etcd version. If the ConfigMap of your template exists, ac installs the versions that it records. Without it, ac installs the default Kubernetes version of the platform, which is the version that a template made from the image of the current ACP release carries. A template ConfigMap without kubernetesVersion or etcdTag is rejected. When a template ConfigMap applies, ac prints a Pinning Kubernetes <version>, etcd <tag> line. Do not rely on that line. Read the version from spec.version of the KubeadmControlPlane in manifests/ instead.

Network Connectivity

Allow the flows from the global cluster nodes and from the machine that runs ac to DCS. The flows are listed in Huawei DCS. The global cluster nodes need these paths to create the cluster and to manage it later.

Control Plane Endpoint and Image Registry

The control plane endpoint is an IPv4 address. It is either:

The cluster pulls its platform components from the registry of the global cluster, or from a dedicated registry. See Choose the Image Registry for a Workload Cluster.

DCS Credential Secret

A Secret in cpaas-system of the global cluster must hold the DCS sign-in. Note how the Secret is used:

  • The cluster refers to the Secret by name. Unlike the global cluster, it does not hold an inline credential.
  • ac never creates or deletes the Secret.
  • One Secret can serve several clusters.

The account must have the administrator role and be one of the following user types:

userTypeDCS userDCS-side requirement
interconnect, the defaultInterface interconnection userThe policy Whether to modify the password of an interface interconnection user upon password resetting and first login (System Management → Rights Management → Rights Management Policy) must be No. Otherwise, the forced password change breaks sign-in.
domainDomain user, backed by LDAP or ADYour DCS administrator has configured domain authentication and created the directory user in the DCS portal. The directory service governs its password.

Use a dedicated account rather than the portal admin account. DCS locks an account after repeated failed sign-ins, and locking the portal account would lock everyone else out too.

Write the values in a file with an editor, not on the command line, so the password stays out of shell history:

dcs-credential.env
authUser=<auth-user>
authKey=<auth-key>
endpoint=https://<dcs-api-host>:7443
site=<dcs-site-id>
userType=interconnect
KeyValue
authUserThe DCS API user name.
authKeyThe password in plain text, not the SHA-256 digest that the DCS console shows.
endpointThe API address, with https:// and the port (typically 7443), and without a trailing slash.
siteThe bare site ID, not the urn:sites: form.
userTypeOptional. interconnect or domain, case-insensitive. Other values are rejected.

Write each line as key=value without quotes, because ac keeps quote characters as part of the value. Keep the file private (chmod 600 dcs-credential.env), because it holds the password. Create the Secret, then remove the file:

chmod 600 dcs-credential.env
ac config use-cluster global
ac create secret generic <credential-secret-name> -n cpaas-system --from-env-file=dcs-credential.env
rm -f dcs-credential.env

Do not create or update the Secret with ac apply, because it stores the password 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>.

DCS Objects, Capacity, and Addresses

  • The following exist on the site: the VM folder, the distributed virtual switches and port groups, and the datastore or datastore cluster. ac creates none of them.
  • The datastores and hosts have room for the planned VMs. Each node needs its system disk plus every disk of its node group. If a datastore is nearly full, or the hosts are all heavily overcommitted, new VMs get stuck in creating.
  • Control plane spread places the control plane VMs on different DCS hosts with a DRS rule. To use it, make sure that:
    • DRS is enabled on the compute cluster that runs the control plane VMs.
    • There are at least as many healthy hosts as control plane replicas.
    • A datastore is visible to all of those hosts.
    • Nothing blocks DRS migration, such as an attached CD-ROM.
  • Every node has a static IPv4 address and a hostname, and neither is already in use or equal to the control plane endpoint. Neither ac nor the provider reserves addresses on DCS.

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.