Kube-OVN Underlay + MetalLB LoadBalancer Service Configuration
TOC
Overview
This solution addresses the integration of MetalLB L2 mode with Kube-OVN Underlay networking. It allows users to utilize Underlay subnet IPs as MetalLB LoadBalancer Service VIPs, directly forwarding traffic to backend business Pods.
Prerequisites
Environment Requirements
- ACP version: >= 4.3
Traffic Flow
Traffic Diagram:
Configuration Steps
1. Configure ProviderNetwork with VLAN Sub-interfaces
Important: VLAN sub-interfaces must be used.
Configure Kube-OVN Underlay network to automatically create VLAN sub-interfaces:
⚠️ Warning: When modifying the
ProviderNetworkorVlanresources individually, the Underlay network connectivity will be interrupted. Network connectivity will only be restored after both resources are fully configured and in sync. Plan configuration changes during maintenance windows to minimize service disruption.
2. Configure Kube-OVN Controller Parameters
Configure the Kube-OVN controller with the required parameters for LoadBalancer functionality:
Using Web Console:
- Navigate to Administrator > Marketplace > Cluster Plugins, then search for
ovnto locate Alauda Container Platform Networking for Kube-OVN - In the plugin row, click the action menu (vertical ⋮) and select Update to open the configuration dialog
- Configure the following settings:
- Skip CT for Dst LPort IPs: No
- Enable OVN LB Local: Yes
3. Configure Underlay Subnet External Address Feature
Edit the Underlay subnet to reserve an IP range for LoadBalancer usage:
Important: External address pool IPs must be within the Underlay subnet.
Modify the Underlay subnet parameter spec.enableExternalLBAddress: true:
4. Create MetalLB External Address Pool
Deploy the address pool:
5. Create Sample Application and LoadBalancer Service
Deploy the application: