Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 3.32 KB

CLUSTERCTL.md

File metadata and controls

49 lines (41 loc) · 3.32 KB

Clusterctl

Set up

Install Clusterctl v1.1.3 Currently, the below manual steps are required to enable clusterctl for CAPVCD 1.0.0.

  1. Create a folder structure ~/infrastructure-vcd/v1.0.0/.
  2. Copy the contents from templates directory to ~/infrastructure-vcd/v1.0.0/
  3. Copy metadata.yaml to ~/infrastructure-vcd/v1.0.0/
  4. Copy the ~/infrastructure-vcd/v1.0.0/clusterctl.yaml to ~/.cluster-api/clusterctl.yaml
  5. Update the providers.url in ~/.cluster-api/clusterctl.yaml to ~/infrastructure-vcd/v1.0.0/infrastructure-components.yaml
providers:
  - name: "vcd"
    url: "~/infrastructure-vcd/v1.0.0/infrastructure-components.yaml"
    type: "InfrastructureProvider"

Initialize Management cluster

  1. Run the below command to initialize the management cluster with the Cluster API and the associated provider for VMware Cloud Director clusterctl init --core cluster-api:v1.1.3 -b kubeadm:v1.1.3 -c kubeadm:v1.1.3 -i vcd:v1.0.0
  2. Apply CRS definitions to ensure CNI, CPI and CSI are automatically installed on the workload clusters.

Generate cluster manifests for workload cluster

  1. Fill out the values for the environment variables in ~/.cluster-api/clusterctl.yaml.
  2. Generate the CAPI manifest file.
    • clusterctl generate cluster <clusterName> -f v1.21.8-crs > <clusterName>.yaml.
  3. Create the workload cluster by applying it on the (parent) management cluster.
    • kubectl apply -f <clusterName>.yaml
  4. Apply CRS labels and enable the resultant add-ons like CPI, CSI to access VCD resources

Template flavors

  • All of the templates to generate the cluster manifests are located at templates directory under the root of the github repository.
  • All the flavors listed support only v1beta1 API versions of CAPVCD and Core CAPI.
  • Currently, we have v1.20.8, v1.21.8, v1.22.9 as template flavors, and they each have their own etcd/dns versions pre-populated. Please ensure your ~/.cluster-api/clusterctl.yaml has VCD_TEMPLATE_NAME matching the correct versions of Kubernetes. For example, if VCD_TEMPLATE_NAME=Ubuntu 20.04 and Kubernetes v1.21.8+vmware.1 then use v1.21.8-crs flavor.
  • It is strongly recommended to use v1.y.z-crs flavors to ensure CNI, CPI and CSI are automatically installed on the workload clusters. CNI and CPI are required add-ons for the cluster creation to be successful.