Bundles
Welcome to the guide on setting up MetalLB on a Kairos cluster with K3s! This tutorial will walk you through the steps of using a Kairos bundle to automatically configure MetalLB on your local network with an IP range of 192.168.1.10-192.168.1.20
. Check out the MetalLB example to configure it without a bundle.
For those unfamiliar with MetalLB, it is an open-source load balancer implementation for bare metal Kubernetes clusters that utilizes standard routing protocols. When used with K3s on Kairos, it provides load balancing capabilities and helps manage IP addresses within a cluster.
Prerequisites
Before we begin, you will need to have the following:
- A Kairos standard image which includes K3s
- A baremetal node to run the installation
Installation
- Follow the Installation documentation for Kairos.
- Use the following cloud configuration file when setting up Kairos:
#cloud-config
hostname: metal-{{ trunc 4 .MachineID }}
users:
- name: kairos
# Change to your pass here
passwd: kairos
ssh_authorized_keys:
# Replace with your github user and un-comment the line below:
# - github:mudler
k3s:
enabled: true
args:
- --disable=traefik,servicelb
# Specify the bundle to use
bundles:
- targets:
- run://quay.io/kairos/community-bundles:metallb_latest
# Specify metallb settings, available only with the bundle.
metallb:
version: 0.13.7
address_pool: 192.168.1.10-192.168.1.20
There are a few key points to note in the configuration file:
- The
metallb
block is provided by the MetalLB bundle and allows us to specify the version of MetalLB that we want to deploy, as well as theaddress_pool
available for our services. - The
bundles
block enables therun
bundle type. The bundle we are using is part of the community-bundles repository.
And that’s it! With these steps, you should now have MetalLB configured and ready to use on your Kairos cluster. If you have any questions or run into any issues, don’t hesitate to check out the bundle documentation or reach out to the community for support.