Member-only story

MetalLB

Kubernetes External Load Balancer

--

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
customresourcedefinition.apiextensions.k8s.io/bgppeers.metallb.io created
customresourcedefinition.apiextensions.k8s.io/communities.metallb.io created
customresourcedefinition.apiextensions.k8s.io/ipaddresspools.metallb.io created
customresourcedefinition.apiextensions.k8s.io/l2advertisements.metallb.io created
customresourcedefinition.apiextensions.k8s.io/servicel2statuses.metallb.io created
serviceaccount/controller created
serviceaccount/speaker created
role.rbac.authorization.k8s.io/controller created
role.rbac.authorization.k8s.io/pod-lister created
clusterrole.rbac.authorization.k8s.io/metallb-system:controller created
clusterrole.rbac.authorization.k8s.io/metallb-system:speaker created
rolebinding.rbac.authorization.k8s.io/controller created
rolebinding.rbac.authorization.k8s.io/pod-lister created
clusterrolebinding.rbac.authorization.k8s.io/metallb-system:controller created
clusterrolebinding.rbac.authorization.k8s.io/metallb-system:speaker created
configmap/metallb-excludel2 created
secret/metallb-webhook-cert…

--

--

No responses yet

Write a response