The Single Load Balancer (LB) controller enables centralized load balancing for Network Performance Monitoring (NPM) on the OpsRamp NextGen Gateway.

When you enable this feature, the system provides a virtual IP for NPM collector service from the provided address pool and automatically distributes traffic across collector pods. This improves scalability, simplifies configuration, and removes dependency on node-level networking.

Scope and limitations

  • The Single LB controller applies only to NPM collector workloads.
  • Gateway services continue to run in their existing mode and their service IPs will also be unchanged. They aren’t affected when the feature is enabled.
  • In earlier beta releases, the Single LB controller could be enabled for both NPM and gateway services. From Gateway 21.2.1 release, the Single LB controller works only for NPM workloads and does not apply to gateway load balancer services.
  • This feature depends on Open vSwitch (OVS) modules. OVS modules are available by default in most supported ISO-based deployments. If OVS modules are not present, you must install them on all virtual machines and Kubernetes cluster nodes before enabling the feature.

Key Capabilities

  • Provide a single entry point (virtual IP) for all NPM traffic.
  • Enable automatic horizontal scaling of NPM collector pods, defaults to a maximum of 5 pods and can be modified using Helm commands.

Example:

helm upgrade npm-collector oci://us-central1-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/npm-collector --version <existing-version>
  --reuse-values \
  --set hpa.maxReplicas=10

  • Distribute traffic across pods using a centralized load balancer.

Problem

Without the Single LB controller:

  • NPM uses NodePorts (30000–32767). Using default ports requires updating the NodePort range and restarting Kubernetes (K8s/K3s).
  • Exporters must send traffic to specific node IPs, which change when pods move.
  • A single collector pod handles ~25K flows/sec, with no automatic scaling.

Solution

When you enable the Single LB controller:

  • A dedicated load balancer controller pod is deployed.
  • A virtual IP (VIP) is assigned to the NPM service.
  • All incoming flow traffic is sent to this VIP.
  • The controller distributes traffic across NPM collector pods in round-robin fashion.
  • The system automatically scales pods using HPA (horizontal pod autoscaling).
  • Traffic uses the ports configured for the NPM collector integration through the VIP.

Prerequisites

  • You are running NextGen Gateway version 21.2.0 or later.
  • You have configured MetalLB or an equivalent Kubernetes load balancer on your cluster.
  • You use a dedicated gateway for NPM workloads for optimal performance (recommended).
  • The NPM service must receive an EXTERNAL-IP from the MetalLB pool.

Deployment scenarios

Case 1: New deployment

  1. Install the gateway using the Opsramp collector-start binary. See Registering NextGen Gateway using yaml config file for more details.
  2. Enable Single LB controller in the configuration YAML.
  3. Install NPM collector → runs in LB mode automatically

Case 2: Existing gateway without NPM

  1. Upgrade the gateway to version 21.2.1 or later.
  2. Run Helm upgrade using the following command:
helm upgrade nextgen-gw \
oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/nextgen-gw \
--set global.useSingleLBController=enable \
--version <current-gw-version> \
--reuse-values
  1. Install NPM collector in LB mode.

Case 3: Existing gateway with NPM

Upgrade the gateway to version 21.2.1 or later using the following command:

helm upgrade nextgen-gw \
oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/nextgen-gw \
--set global.useSingleLBController=enable \
--version <current-gw-version> \
--reuse-values
  1. Upgrade NPM collector:
helm upgrade npm-collector \
oci://us-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/npm-collector \
--set useSingleLBController=enable \
--version <current-gw-version> \
--reuse-values

You must upgrade both gateway and NPM collector. This feature is available only for 2.0.0 and 3.0.0 versions.

Case 4: Existing beta users

  • No manual changes required.
  • Your existing load balancer (LB) configuration is preserved after the upgrade. Previously, Gateway services shared the same IP and operated under the same LB mode. After the upgrade, Gateway services operate independently, and only NPM uses the LB model. Ensure that you verify IP address assignments for Kubernetes services accordingly.

Verify configuration

  1. Run the following command:
kubectl get svc -n <namespace> | grep LoadBalancer
  1. Verify that the NPM service is running in LoadBalancer mode and has an EXTERNAL-IP assigned.
kubectl get pods -n <namespace> | grep npm
kubectl get hpa -n <namespace>

Verify that: NPM collector pods are running. HPA is active.

  1. For ISO-based deployments, verify that MetalLB components are running:
    kubectl get pods -n kube-system | grep metallb

If you encounter issues with MetalLB IP allocation or MetalLB IP range updates, use the MetalLB troubleshooting tools and commands to investigate the configuration. See Configuring MetalLB IP Ranges for more details.