Install Clusterctl v1.1.3 Currently, the below manual steps are required to enable clusterctl for CAPVCD 1.0.0.
- Create a folder structure
~/infrastructure-vcd/v1.0.0/
. - Copy the contents from templates directory to
~/infrastructure-vcd/v1.0.0/
- Copy metadata.yaml to
~/infrastructure-vcd/v1.0.0/
- Copy the
~/infrastructure-vcd/v1.0.0/clusterctl.yaml
to~/.cluster-api/clusterctl.yaml
- 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"
- 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
- Apply CRS definitions to ensure CNI, CPI and CSI are automatically installed on the workload clusters.
- Fill out the values for the environment variables in
~/.cluster-api/clusterctl.yaml
.- One of the variables is RefreshToken. Refer to How to create refreshToken (or) API token in Cloud Director.
- Refer to the script to get Kubernetes, etcd, coredns versions from TKG OVA to fill in few variables. Note that you may skip filling in few of these variables if you decide to use the existing clusterctl template flavors.
- Generate the CAPI manifest file.
clusterctl generate cluster <clusterName> -f v1.21.8-crs > <clusterName>.yaml
.
- Create the workload cluster by applying it on the (parent) management cluster.
kubectl apply -f <clusterName>.yaml
- Apply CRS labels and enable the resultant add-ons like CPI, CSI to access VCD resources
- 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
hasVCD_TEMPLATE_NAME
matching the correct versions of Kubernetes. For example, ifVCD_TEMPLATE_NAME=Ubuntu 20.04 and Kubernetes v1.21.8+vmware.1
then usev1.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.