This is a step-by-step guide on deploying RKE2 workload clusters on the SUSE Metal3 Demo environment.
- A fully functioning Metal3 deployment
- Two available virtual bare metal hosts
- For simplicity, we will continue working in the
vbmc
directory created in the VBMH Readme.
cd ~/vbmc
- Get the MAC address of the VBMH that will act as the control plane and save it as a variable
CONTROLPLANEMAC=$(virsh dumpxml node-1 | grep 'mac address' | grep -ioE "([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}")
- Create an XML file with the following information:
cat << EOF > ~/vbmc/host.xml
<host mac='$CONTROLPLANEMAC' ip='192.168.124.200'/>
EOF
- Perform a live update to the provisioning network to give a static IP to the VBMH
virsh net-update provisioning add-last ip-dhcp-host host.xml --live
- Create an XML file containing the following
cat << EOF > ~/vbmc/dns.xml
<host ip='192.168.124.100'>
<hostname>media.suse.baremetal</hostname>
</host>
EOF
- Live update the provisioning network once again
virsh net-update provisioning add-last dns-host dns.xml --live
- SSH into the metal3-core VM
- Download the example manifests
curl https://raw.githubusercontent.com/suse-edge/metal3-demo/main/docs/example-manifests/dhcp/rke2-control-plane.yaml > rke2-control-plane.yaml
curl https://raw.githubusercontent.com/suse-edge/metal3-demo/main/docs/example-manifests/dhcp/rke2-agent.yaml > rke2-agent.yaml
- This configuration is specific to the Metal3 and VBMH setup docs. If you have made your own changes or have differences in your setup, you may need to update the manifests.
- This configuration assumes DHCP-only network setup.
- Deploy the control plane
kubectl apply -f rke2-control-plane.yaml
- Verify that the control plane is properly provisioned
$ clusterctl describe cluster sample-cluster
NAME READY SEVERITY REASON SINCE MESSAGE
Cluster/sample-cluster True 22m
├─ClusterInfrastructure - Metal3Cluster/sample-cluster True 27m
├─ControlPlane - RKE2ControlPlane/sample-cluster True 22m
│ └─Machine/sample-cluster-chflc True 23m
- Deploy the agent
kubectl apply -f rke2-agent.yaml
- Verify that the agent is properly provisioned and has successfully joined the cluster
$ clusterctl describe cluster sample-cluster
NAME READY SEVERITY REASON SINCE MESSAGE
Cluster/sample-cluster True 25m
├─ClusterInfrastructure - Metal3Cluster/sample-cluster True 30m
├─ControlPlane - RKE2ControlPlane/sample-cluster True 25m
│ └─Machine/sample-cluster-chflc True 27m
└─Workers
└─MachineDeployment/sample-cluster True 22m
└─Machine/sample-cluster-56df5b4499-zfljj True 23m