Cluster API Providers Enterprise
Creating leaf clusters
To enable leaf cluster creation, Weave GitOps leverages the Cluster-API (CAPI) providers for AWS or Docker. In this section we cover the steps to deploy the providers on a Kubernetes cluster that is running the Weave GitOps.
CAPI provides declarative APIs, controllers, and tooling to manage the lifecycle of Kubernetes clusters, across a large number of infrastructure providers. The CAPI custom resource definitions are platform independent as each provider implementation handles the creation of VMs, VPCs, networks and other required infrastructure parts, enabling consistent and repeatable cluster deployments. For more information on the CAPI project, refer to the CAPI book.
Configure and deploy the CAPI providers
In all cases, CAPI requires kubectl access to an existing Kubernetes cluster, so in our case we configure
kubectl to use the management cluster.
AWS provider (CAPA)
After having configured
kubectl, to deploy the CAPA components, follow the steps at https://cluster-api-aws.sigs.k8s.io/getting-started.html#install-clusterctl
Docker provider (CAPD)
The Docker infrastructure provider is a reference implementation and is a practical way of testing the Weave GitOps cluster creation feature. It is not intended for production clusters. As CAPD will start docker containers in the host nodes of the management cluster, note that if you are using it with a
kind cluster you'll need to mount the docker socket as described in the Install and/or configure a kubernetes cluster kind section.
Similar to the AWS provider case, configure
kubectl to use the management cluster, and to deploy the CAPD components follow the steps at https://cluster-api-aws.sigs.k8s.io/getting-started.html#install-clusterctl.