Creation Reference

This page describes what every provider shares when you create a workload cluster with ac adm alpha cluster create. Each provider's creation page links here.

Common install-config.yaml Fields

The file has four parts:

  • cluster: the name, network, keys, and encryption.
  • provider.<name>: the infrastructure of one provider.
  • controlPlane and computes: the node groups.
  • credentialRef: the infrastructure credential.

The following structure shows only the fields that every provider uses. It is not a complete file. To write your file, start from the template of your provider instead. The template adds the fields of that provider, such as the control plane endpoint and the node network and disks, and describes them.

ac rejects an unknown or misspelled field before it changes anything, and the error names the field path.

Unlike the file of the global cluster, this file has no global section and no deployMode. ac rejects both.

install-config.yaml (common structure)
cluster:
  clusterName: <cluster-name>
  sshKeys:
    - <ssh-public-key>
  # registrySecretRef:
  #   name: <registry-secret-name>
  #   namespace: cpaas-system
  # encryptionProviderConfig: <encryption-key>
  ntpServers: [] 
  network:
    podCIDR: 10.199.0.0/16
    serviceCIDR: 10.96.0.0/12
    kubeOVN:
      joinCIDR: 100.64.0.0/16

provider:
  <provider-name>: {} 

controlPlane:
  replicas: 3
  <provider-name>: {} 

computes:
  - name: worker
    replicas: 3
    <provider-name>: {}

credentialRef:
  name: <credential-secret-name>
  namespace: cpaas-system
#FieldDescription
clusterRequired · objectCluster-wide settings that do not depend on the provider.
1cluster.clusterNameRequired · stringA DNS-1123 subdomain of at most 63 characters. It must not be global and must not start with global-. The Cluster object and the provider's cluster object take this name. Every other rendered object is prefixed with <cluster-name>-.
2cluster.sshKeysRequired · []stringThe SSH public keys of the boot user on every node. Use them to log in to the nodes.
3cluster.registrySecretRefOptional · object · Default: the registry of the global clusterSelects a registry other than the one of the global cluster. This requires platform v4.4.0 or later. name: at most 63 characters. namespace: cpaas-system, the default and the only accepted value. The Secret must be labeled capi.cpaas.io/provider=registry-credential. It must have a registry key, which holds the address without a scheme or /v2/. The optional username and password keys must be set together. See Choose the Image Registry for a Workload Cluster.
4cluster.encryptionProviderConfigOptional · string · Default: generatedThe base64 encoding of a 16, 24, or 32 byte aescbc key, not a configuration file. The key encrypts Secrets at rest in the API server of the cluster. A generated key is kept only in <install-dir>/manifests/. Keep that directory, because rendering again without it generates a new key.
5cluster.ntpServersOptional · []string · Default: []The NTP servers of the nodes. They are written into the chronyd configuration and take precedence over the sources in the image. When the list is empty, the time configuration of the image applies.
cluster.networkConditional · objectThe cluster network. Required on VMware vSphere, Huawei DCS, and Bare Metal, which need loadBalancer. On Huawei Cloud Stack, loadBalancer is not allowed and the three CIDRs have defaults, so you can leave the section out. Besides the rules in each row, none of the three CIDRs may overlap the host network or the CIDRs of other clusters on the same global cluster.
6cluster.network.podCIDROptional · string · Default: 10.199.0.0/16The Pod CIDR. It must not overlap the Service CIDR or the join CIDR.
7cluster.network.serviceCIDROptional · string · Default: 10.96.0.0/12The Service CIDR. It must not overlap the Pod CIDR or the join CIDR.
8cluster.network.kubeOVN.joinCIDROptional · string · Default: 100.64.0.0/16The Kube-OVN join CIDR. It must not overlap the Pod CIDR or the Service CIDR.
providerConditional · objectThe provider settings, under a key named after the provider. Required on VMware vSphere, Huawei DCS, and Huawei Cloud Stack. Leave it out on Bare Metal, which rejects it.
9provider.<provider-name>Conditional · objectThe infrastructure of the provider: vsphere, dcs, or hcs. See the creation page of the provider. Bare Metal rejects this field, because a Bare Metal workload cluster has no provider section.
controlPlaneRequired · objectThe control plane node group.
10controlPlane.replicasRequired · integer1, or an odd number of 3 or more, for the stacked etcd. A single node is for testing and cannot be upgraded.
11controlPlane.<provider-name>Conditional · objectThe node group fields of the provider. The same fields appear in computes[]. Whether this field is required depends on the provider; see its template.
computes[]Optional · []object · Default: []The worker node groups, one entry per group.
12computes[].nameRequired · stringA DNS-1123 label that is unique among the groups. control-plane is reserved.
13computes[].replicasOptional · integer · Default: 0The number of nodes in the group. It must not be negative.
14credentialRefConditional · objectThe Secret that holds the infrastructure credential. You create it before you run create. ac does not render or delete it. On VMware vSphere, the provider deletes it together with the cluster; see Delete a Cluster. name: the Secret name. namespace: cpaas-system, the default and the only accepted value. Required on Huawei DCS, Huawei Cloud Stack, and VMware vSphere, whose prerequisites list the keys of the Secret. Bare Metal rejects this field.

computes is optional. Without it, the cluster runs on its control plane nodes alone.