The Cluster API provider for metal-stack (CAPMS) implements the declarative management of Kubernetes cluster infrastructure.
Caution
This project is currently under heavy development and is not advised to be used in production any time soon. Please use our stack on top of Gardener instead. User documentation will follow as soon. Until then head to our CONTRIBUTING.md
Currently we provide the following custom resources:
MetalStackCluster
can be used as infrastructure cluster and ensures that the metal-stack network and firewall are being prepared.MetalStackMachine
bridges between infrastructure machines and metal-stack machines.
Note
Currently our infrastructure provider is only tested against the Cluster API bootstrap provider Kubeadm (CABPK). While other providers might work, there is no guarantee nor the goal to reach compatibility.
Prerequisites:
- a running metal-stack installation
- CRDs for Prometheus
- CRDs for the Firewall Controller Manager
First add the metal-stack infrastructure provider to your clusterctl.yaml
:
# ~/.config/cluster-api/clusterctl.yaml
providers:
- name: "metal-stack"
url: "https://github.com/metal-stack/cluster-api-provider-metal-stack/releases/latest/infrastructure-components.yaml"
type: InfrastructureProvider
Now you are able to install the CAPMS into your cluster:
export METALCTL_API_URL=http://metal.172.17.0.1.nip.io:8080
export METALCTL_API_HMAC=metal-admin
export EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION=true
clusterctl init --infrastructure metal-stack
Now you should be able to create Clusters on top of metal-stack. For your first cluster it is advised to start with our generated template.
# to display all env variables that need to be set
clusterctl generate cluster example --kubernetes-version v1.30.6 --infrastructure metal-stack --list-variables
Caution
Manual steps needed: Due to the early development stage the following manual actions are needed for the cluster to operate.
- The firewall needs to be created manually.
- You need to install your CNI of choice. This is required due to CAPI.
- Control plane and worker nodes need to be patched.
kubectl patch node <worker-node-name> --patch='{"spec":{"providerID": "metal://<machine-id>"}}'