Skip to content

Latest commit

 

History

History
107 lines (78 loc) · 3.43 KB

rke2-cluster.md

File metadata and controls

107 lines (78 loc) · 3.43 KB

Intro

RKE2 Workload Cluster Deployment on Metal3

This is a step-by-step guide on deploying RKE2 workload clusters on the SUSE Metal3 Demo environment.

Pre-requisites

  • A fully functioning Metal3 deployment
  • Two available virtual bare metal hosts

Deploying the Workload Cluster

  • For simplicity, we will continue working in the vbmc directory created in the VBMH Readme.
cd ~/vbmc
  1. 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}")
  1. Create an XML file with the following information:
cat << EOF > ~/vbmc/host.xml
<host mac='$CONTROLPLANEMAC' ip='192.168.124.200'/>
EOF
  1. 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
  1. 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
  1. Live update the provisioning network once again
virsh net-update provisioning add-last dns-host dns.xml --live
  1. SSH into the metal3-core VM
  1. 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.
  1. Deploy the control plane
kubectl apply -f rke2-control-plane.yaml
  1. 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
  1. Deploy the agent
kubectl apply -f rke2-agent.yaml
  1. 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