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:
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: