This document provides step-by-step instructions to upgrade MetalLB from version 1.0.0 to the latest supported version, ensuring continuity in load balancer functionality.

Prerequisites

  • Kubernetes cluster running on OpsRamp ISO/OVA
  • MetalLB version 1.0.0 installed
  • Helm CLI access

Step-by-Step Upgrade Instructions

Step 1: Check the Current MetalLB Version

Run the following command to check the version of installed MetalLB.

helm list -n kube-system

Sample Responce:

root@hd-ng-19-3n-host2:/home/gateway-admin# helm list -n kube-system
NAME         	NAMESPACE  	REVISION	UPDATED                                	STATUS  	CHART              	APP VERSION
ipaddresspool	kube-system	1       	2025-06-09 07:00:07.415427932 +0000 UTC	deployed	ipaddresspool-2.0.0	1.16.0     
metallb      	kube-system	1       	2025-06-09 06:49:31.148955856 +0000 UTC	deployed	metallb-**6.4.3**      	0.14.9 
   

Proceed with the following steps only if the version displayed is metallb-6.4.3.

Step 2: List the Current IPs

To retrieve the list of IP addresses currently used by MetalLB, run the below command:

kubectl get cm -n kube-system metallb-config -o jsonpath="{['data']['config']}" | grep -Ev "address-pools:|protocol: layer2|addresses:|name: default" | tr --delete - | tr --delete " " 

Sample Responce:

10.25.250.9/32 
10.12.24.122/32 

Step 3: Check the Services

List all services to identify which ones use external IPs:

kubectl get svc 

Sample Responce:

bootstrap

Step 4: Backup IPs and Services

Before proceeding, manually back up the IP addresses and their associated services for reference in case reconfiguration is needed later.

Step 5: Upgrade MetalLB Helm Chart

Update the MetalLB Helm chart to the latest version:

helm upgrade metallb oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/metallb --version 6.3.6 -n kube-system 

Step 6: Verify MetalLB Pods

Wait for the MetalLB pods to restart and confirm they are running:

kubectl get pods -n kube-system | grep metallb 

Sample Responce:

root@hd-ng-19-3n-host2:/home/gateway-admin# kubectl get pods -n kube-system | grep metallb
metallb-controller-fc66bbfbd-9qbgk   1/1     Running   0        30m
metallb-speaker-4ngh4                1/1     Running   0        30m

Step 7: Install the IPAddressPool Chart

Install the IPAddressPool chart using the IPs obtained in Step 2. Replace the IP list with your actual IPs.

helm install ipaddresspool oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/ipaddresspool --version 2.0.0 --set IPAddressPool={"IP Address"} -n kube-system 

For a single IP, omit the comma. For multiple, use a comma-separated list.

Example:

helm install ipaddresspool oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/ipaddresspool --version 2.0.0 --set IPAddressPool={"172.25.250.9/32,10.12.24.122/32"} -n kube-system 

Step 8: Check Service IP Assignments

Run the following to ensure services have been assigned the expected IPs:

kubectl get svc 

If the IPs match your backup, the upgrade was successful. If IPs were assigned to incorrect services, proceed to Step 9.

Step 9: Correct IP Assignments (If Needed)

If services received incorrect IPs, update their type values to reassign IPs in the desired order.

kubectl patch svc nextgen-gw-tcp -p '{"spec": {"type": "ClusterIP"}}' 
kubectl patch svc nextgen-gw-udp -p '{"spec": {"type": "ClusterIP"}}' 
kubectl patch svc squid-proxy -p '{"spec": {"type": "ClusterIP"}}' 
Option 1: Assign First IP to squid-proxy

kubectl patch svc squid-proxy -p '{"spec": {"type": "LoadBalancer"}}' 
kubectl patch svc nextgen-gw-tcp -p '{"spec": {"type": "LoadBalancer"}}' 
kubectl patch svc nextgen-gw-udp -p '{"spec": {"type": "LoadBalancer"}}' 
Option 2: Assign First IP to nextgen-gw
kubectl patch svc nextgen-gw-tcp -p '{"spec": {"type": "LoadBalancer"}}' 
kubectl patch svc nextgen-gw-udp -p '{"spec": {"type": "LoadBalancer"}}' 
kubectl patch svc squid-proxy -p '{"spec": {"type": "LoadBalancer"}}' 

The order of execution matters — it determines IP assignment.

Step 10: Verify Final Service IPs

Run the following to confirm the correct IP is assigned to each service:

kubectl get svc 

Sample Response

Verify that each service has been assigned the intended IP address. get svc

Summary

You have now successfully upgraded MetalLB from version 1.0.0 to the latest version, retained your existing IP addresses, and revalidated correct IP-to-service assignments.