MetalLB
MetalLB addresses a gap when Kubernetes is installed on Bare Metal. Default bare metal installations do not support the LoabBalancer type for services. MetalLB closes this gap by providing these services and is extremely helpful in a home lab setting. Installing this will greatly improve your experience with configuring an Ingress.
Product: MetalLB
Install Type: Manifests
Container Image: Quay (Red Hat
Installation Details
MetalLB provides excellent installation documentaion and I would recommend reading though it before beginning. As this was one of the very first things I installed on my cluster, I used the manifests as I had not yet tackled Helm. I used the following to install:
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.3/config/manifests/metallb-native.yaml
Please check the version to be sure you are installing the most recent.
MetalLB will remain idle until you define an address range to assign. I first modified my DHCP server (on my router) to exclude a range of IP addresses and moved any endpoints currently in the range so these IP addresses would be exclusively available to MetalLB. I then defined my pool with the following manifests:
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default
namespace: metallb-system
spec:
addresses:
- 192.168.50.2-192.168.50.99
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: l2advertisement1
namespace: metallb-system
spec:
ipAddressPools:
- default
For most home labs, Level 2 is most likely be what you will want to use. MetalLB does support protocols like BGP and FRR, but unless you have a compatible networking equipment already configured to use these protocols you should avoid them. I would highly recommend reading though the documentation on the MetalLB website for more detailed information or if you want to configure BGP or FRR.