Create a Cluster on Huawei Cloud Stack
ACP CLI (ac) renders the Cluster API and HCS objects from one install-config.yaml, applies them to the global cluster, and reports the creation stages. Every object lives in the cpaas-system namespace of the global cluster.
TOC
PrerequisitesProcedure1. Writeinstall-config.yaml2. Create the Cluster3. Monitor the Creation4. Verify the ClusterControl Plane HARun create AgainNext StepsPrerequisites
- You meet the Huawei Cloud Stack prerequisites.
acis logged in to the platform as a platform administrator (ac login https://<platform-address> --name <session-name>).
Procedure
1. Write install-config.yaml
Create an installation directory for the cluster and write install-config.yaml in it. ac writes manifests/ and logs/ac.log next to it.
Copy the following template and fill in the placeholders. The table below the template describes the numbered lines, which are specific to Huawei Cloud Stack. For the other fields, see Common install-config.yaml Fields. For the objects that ac renders from this file, see Parameters.
cluster.network.loadBalancer is rejected, because the control plane endpoint is the ELB under provider.hcs.elb. For cluster.registrySecretRef, see Workload Cluster Image Registry.
2. Create the Cluster
Run the following command from a machine where ac is logged in to the platform:
ac first checks the platform's Kubernetes and Kube-OVN versions, the providers, the registry, and the credential Secret and its IAM endpoint. If a check fails, nothing is changed and the error names the item. Before you run create, make sure that the credential is correct, and that the names of the image, flavor, availability zone, VPC, subnet, and security group are correct.
create returns once the objects are applied, and the cluster keeps building. To wait until all stages are ready, add --wait. --timeout (default 2h) limits only the wait. To render without applying, run ac adm alpha cluster manifests with the same --dir and --provider.
3. Monitor the Creation
Continue when all four stages are ready; otherwise see Troubleshooting.
4. Verify the Cluster
Run the following commands from a machine where ac is logged in to the platform:
Continue when every node is Ready; otherwise see Troubleshooting.
Control Plane HA
Applies to: provider.hcs.controlPlaneHA.enabled: true, the default. Skip it when it is false.
Continue when the status is True; otherwise see Control Plane HA in Troubleshooting.
Run create Again
create only creates the cluster. Do not run it on a cluster that already exists. To change a running cluster, see Manage Nodes.
If create stops before the cluster is created, run the same command again. Completed work is skipped. When you run create again on the same directory:
- It recreates objects that were deleted. The exception is a Secret:
accreates Secrets once and then leaves them as they are. - It does not overwrite a field that you changed with another tool. When the rendered value differs,
createreports that the fields are owned by another manager and stops. Do not delete the object that the error names. - It does not change the subnet list of the
HCSCluster(spec.network.subnets) once theHCSClusterexists. A subnet that you add to or change ininstall-config.yamlafter that has no effect. - When
manifests/already exists,createasks whether to reuse it. Press Enter to reuse it, or answernto render again after you changeinstall-config.yaml. When standard input is not a terminal, pass--reuse-manifests=trueor--reuse-manifests=falseinstead. - Reusing
manifests/ignoresinstall-config.yamland skips every check.
Do not edit the files in manifests/.
Keep <install-dir>/manifests/, or set cluster.encryptionProviderConfig. A generated encryption key is kept on disk only in manifests/. If you render again without doing either, a new key is generated, and manifests/ then no longer records the key that the cluster uses.