Overview
In Kubernetes environments, LoadBalancer services are a key mechanism for exposing internal cluster services to external clients. When a Kubernetes service is defined with the type: LoadBalancer, Kubernetes automatically provisions an external IP address that routes traffic to the specified service. In OpsRamp NextGen Gateway deployments, load balancers play a critical role in ensuring that services such as
- SNMP traps
- Syslogs
- Squid Proxy function as expected
This document outlines how load balancers are configured across different deployment models-single-node, multi-node, and customer-managed Kubernetes clusters and provides guidance on best practices for IP address configuration and traffic routing.
Why Load Balancer Configuration Matters
The Load Balancer IP is the primary external entry point (inbound) to the Gateway for various types of communication. It is essential that these IPs are correctly configured on all connected devices to avoid data loss or monitoring failure.
Key Use Cases:
- SNMP Traps & Syslog Messages:
The Gateway’s Load Balancer IP must be configured on end devices to successfully receive SNMP traps and syslog logs. - Squid Proxy Service (Optional):
If enabled, the Squid Proxy service will be assigned a separate Load Balancer IP, used exclusively for agent communications to the OpsRamp SaaS platform.
Note
Make sure the proxy IP is not shared with the main Gateway functions to prevent conflicts. Refer to Download Proxy Agent on Windows and Download Proxy Agent on Linux for detailed setup instructions.Gateway Deployment Models in Kubernetes & Load Balancer Setup
There are 3 supported methods for deploying the OpsRamp NextGen Gateway on Kubernetes:
- OpsRamp ISO/OVA - Single-Node Deployment
- OpsRamp ISO/OVA - Multi-Node Deployment
- Customer-Owned Kubernetes Clusters (Cloud-Hosted or Bare-Metal)
1. OpsRamp ISO/OVA - Single-Node Deployment
For single-node deployments using the OpsRamp-provided ISO or OVA, ServiceLB is used as the default load balancer. ServiceLB is a lightweight, built-in solution ideal for smaller or development environments.
How to Enable ServiceLB
Run the following command during cluster initialization:
opsramp-collector-start setup initHow ServiceLB Works:
- Service Exposure: When a Kubernetes service is created with type: LoadBalancer, ServiceLB provisions an external IP (typically the node IP).
- Traffic Routing: ServiceLB uses NodePorts (range: 30000–32767) to route traffic to the correct service pods.
- Dynamic IP Assignment: External IPs are allocated dynamically from the node’s available IPs.
- Cluster Networking: It routes external traffic based on Kubernetes labels and selectors.
2. OpsRamp ISO/OVA - Multi-Node Deployment
In a multi-node Gateway deployment, MetalLB replaces ServiceLB to provide more robust and scalable load balancing.
Why Use MetalLB?
- High Availability: Supports external traffic distribution across multiple nodes.
- Scalability: More reliable than ServiceLB in production-grade clusters.
- Custom IP Ranges: Allows you to define and control the external IP range used for LoadBalancer services.
How MetalLB Works:
- MetalLB operates in either Layer 2 (ARP-based) or BGP (Border Gateway Protocol) mode, depending on your network setup.
- External IPs are assigned from a pre-defined range.
- Traffic is routed to service endpoints based on availability and pod status.
Info
Recommended for production and HA environments.How to Enable ServiceLB:
Refer to the MetalLB IP Range Configuration Guide to define and apply your IP range. Update the Gateway configuration accordingly once the range is set.
3. Customer-Owned Kubernetes Clusters
In customer-managed Kubernetes environments (cloud or on-prem), the load balancing setup depends on the underlying infrastructure.
A. Cloud-Provider Managed Clusters (e.g., AWS EKS, GCP GKE, Azure AKS)
- Automatic Provisioning: Most cloud providers manage the load balancer lifecycle.
- Simply set your service type to
LoadBalancerin the YAML definition. - An external IP is automatically assigned and managed by the cloud provider.
B. Bare-Metal Kubernetes Clusters (e.g., K3s, Kubeadm, MicroK8s, OpenShift)
- Manual Configuration Required: These environments do not include native load balancers.
- You must install and configure a solution like MetalLB or ServiceLB.
- Choose based on:
- Cluster size
- Need for high availability
- Network architecture
Note
Ensure any firewall, router, or DNS settings are updated to reflect the new load balancer IPs.Configuring Load Balancers correctly is essential for the stability and performance of the OpsRamp NextGen Gateway, especially in hybrid environments. Whether you are deploying with the OpsRamp-provided ISO/OVA or managing your own Kubernetes cluster, understanding your load balancer options ensures reliable connectivity for SNMP, Syslog, Proxy agents etc.