githubEdit

MetalLB Install

In this guide we present paths to install MetalLB both via Helm Charts and Kubespray. Please follow only the path applicable, ideal to your environment.

Sections within this guide:

Option 1: Deploy MetalLB with Helm

NOTE - If you plan to upgrade your MetalLB Helm-Chart in the future, ensure the metallb release notesarrow-up-right are followed.

helm repo add metallb https://metallb.github.io/metallb

helm -n metallb-system install metallb metallb/metallb --version 0.13.11

Expose your MetalLB Controller to the Nexqloud IP Operator

kubectl -n metallb-system expose deployment metallb-controller --name=controller --overrides='{"spec":{"ports":[{"protocol":"TCP","name":"monitoring","port":7472}]}}'

Apply your MetalLB Config

NOTE - make sure you replace the example addresses with your IP ranges

Create the MetalLB Config

Apply the MetalLB Config

If you are using MetalLB with a kubernetes version that enforces Pod Security Admissionarrow-up-right (which is beta in k8s 1.23), make sure to label the metallb-system namespace with the following labels:

Option 2: Deploy MetalLB using Kubespray

Based on MetalLB via Kubespray guidance documented herearrow-up-right

The Kubespray flags provided bellow should go into your Provider's Kubespray inventory file and under the vars section. Our reference Provider Kubespray inventory file - used during initial Provider Kubernetes cluster build - is located herearrow-up-right.

Expose your MetalLB Controller to the Nexqloud IP Operator

  • Kubespray your cluster with this config and then expose your MetalLB controller for the Nexqloud IP Operator access it

Migrating MetalLB 0.12.X to 0.13.X

Perform the following only if you have upgraded your MetalLB from 0.12 (or prior) to 0.13 (or higher) version.

Based on https://metallb.universe.tf/configuration/migration_to_crds/arrow-up-right

1). Save the old v0.12 configmap-based metallb config to a config.yaml file

2). Use this command to migrate it to v0.13 (CRD-based format) - (resources.yaml)

This will produce a new config file - resources.yaml.

3). Apply the new config

4). Remove the old config

Example of Legacy v0.12 Metallb Configmap Based Config

  • config.yaml

Example of New metallb v0.13 CRD Based Config

  • resources.yaml

Last updated