Alternative: MetalLB Service-type Load Balancer

How to set up MetalLB for Service-type Load Balancer

The purpose of this document is to walk you through getting set up with MetalLB Kubernetes Load Balancer for your cluster. This is suggested as an alternative if your networking requirements do not allow you to use Kube-Vip .

MetalLB is a native Kubernetes load balancing solution for bare-metal Kubernetes clusters. Detailed information about MetalLB can be found here .


You will need Helm installed on your system as this is the easiest way to deploy MetalLB. Helm can be installed from here . MetalLB installation is described here


  1. Enable strict ARP as it’s required for MetalLB

    kubectl get configmap kube-proxy -n kube-system -o yaml | \
    sed -e "s/strictARP: false/strictARP: true/" | \
    kubectl apply -f - -n kube-system
  2. Pull helm repo for metalLB

    helm repo add metallb
  3. Create an override file to specify LB IP range

    LB-IP-RANGE can be a CIDR block like or range like

    cat << 'EOF' >> values.yaml
        - name: default
          protocol: layer2
          - <LB-IP-range>
  4. Install metalLB on your cluster

    helm install metallb metallb/metallb -f values.yaml
  5. Deploy the Hello EKS Anywhere test application.

    kubectl apply -f
  6. Expose the hello-eks-a deployment

    kubectl expose deployment hello-eks-a --port=80 --type=LoadBalancer --name=hello-eks-a-lb
  7. Get the load balancer external IP

    EXTERNAL_IP=$(kubectl get svc hello-eks-a-lb -o jsonpath='{.spec.externalIP}')
  8. Hit the external ip

    curl ${EXTERNAL_IP}