Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 2.89 KB

capi.md

File metadata and controls

93 lines (67 loc) · 2.89 KB

Bootstrapping Cluster API

Liquid Metal's orchestrator, which will interact with our new host(s) and flintlock service(s), is CAPMVM. This works as part of Cluster API, so we need to use both to create our bare-metal cluster.

Setup

For the purposes of this tutorial, and for simplicity, we are going to use a Kind cluster to run our CAPI management cluster. You can create this cluster anywhere, including on your local machine.

If you set up a Tailscale VPN earlier in the tutorial, you can follow the rest of the walkthrough from your local machine (or any other which you connected to your Tailscale network).

If you did not set up a VPN, first you need to SSH back on to your dhcp-nat device and complete the remainder of the tutorial from there.

Install required tools

Install the following:

Note: there is a handy gist to install the above on Linux.

And run:

kind create cluster

Set configuration

To add the Cluster API Provider MicroVM, we first need to create a clusterctl config file.

Set the version of CAPMVM to that which is compatible with the version of Flintlock you provisioned your metal hosts with.

export CAPMVM_VERSION=<version>

And create the file:

mkdir -p ~/.cluster-api

cat << EOF >>~/.cluster-api/clusterctl.yaml
providers:
  - name: "microvm"
    url: "https://github.com/weaveworks-liquidmetal/cluster-api-provider-microvm/releases/$CAPMVM_VERSION/infrastructure-components.yaml"
    type: "InfrastructureProvider"
EOF

Enable the Cluster Resource Set feature flag (this is so we can use Cilium in the next step):

export EXP_CLUSTER_RESOURCE_SET=true

Apply the CAPI and CAPMVM controllers

We can now initialize the management cluster:

clusterctl init -i microvm

Note: if you do not have access to the cluster-api-provider-microvm repo you will not be able to install this provider.

Next Steps

You are now ready to create microvm based Kubernetes clusters.