Member-only story
MetalLB
Kubernetes External Load Balancer
3 min readJul 13, 2024
This article describes MetalLB step-by-step installation guide and how to use it in a L2 network. There are several ways to install it.
- Installation by Manifest
- Installation with Kustomize
- Installation with Helm
- Installation using the MetalLB Operator
In this article, we will use the first method: installation by Manifest.
Requirement & Preparation
We need a working Kubernetes cluster. To get one, you can deploy it by the steps described in this article.
Before we install the MetalLB, we need to enable strict ARP mode.
kubectl edit configmap -n kube-system kube-proxy
Find the strictARP field, and change its value from false to true.
Deployment
At the time of writing this article, its most recent release version is v0.14.5. Now, we can deploy by applying the manifest.
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.5/config/manifests/metallb-native.yaml
These components will be installed.
namespace/metallb-system created
customresourcedefinition.apiextensions.k8s.io/bfdprofiles.metallb.io created
customresourcedefinition.apiextensions.k8s.io/bgpadvertisements.metallb.io created…