MetalLB Load Balancer
Prerequisites
Manifest
YAML install
version=$(curl https://api.github.com/repos/metallb/metallb/releases/latest | jq -r .tag_name)
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/$version/config/manifests/metallb-native.yaml
# If memberlist secret not found
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
Update ip address and apply
kubectl apply -f ip-pool.yaml
Helm chart
Install with Helm
helm show values oci://registry-1.docker.io/bitnamicharts/metallb > values.metallb.yaml
helm install metallb oci://registry-1.docker.io/bitnamicharts/metallb --create-namespace --namespace metallb-system
Custom configuration
vi values.metallb.yaml
helm upgrade --install metallb oci://registry-1.docker.io/bitnamicharts/metallb --values values.metallb.yaml --create-namespace --namespace metallb-system