Configuring MetalLB to load balance across the cluster
Now that we are clear on MetalLB concepts, we will dive into the steps of configuring MetalLB to load balance across the cluster. The following diagram depicts our Raspberry Pi cluster setup:
Figure 7.3 – MicroK8s Raspberry Pi cluster
Now that we know what we want to do, let's look at the requirements.
Requirements
Before you begin, here are the prerequisites that are needed for building a Raspberry Pi Kubernetes cluster and for the configuration of a MetalLB load balancer:
- A microSD card (4 gigabytes (GB) minimum; 8 GB recommended)
- A computer with a microSD card drive
- A Raspberry Pi 2, 3, or 4 (one or more)
- A micro-USB power cable (USB-C for the Pi 4)
- A Wi-Fi network or an Ethernet cable with an internet connection
- (Optional) A monitor with a High-Definition Multimedia Interface (HDMI) interface
- (Optional) An HDMI cable for the Pi 2 and 3 and a micro-HDMI...