Metallb-vlan configuration

66 views
Skip to first unread message

Malika MEBROUK

unread,
Feb 13, 2024, 6:28:24 AMFeb 13
to metallb-users
Hey everyone,
I'm currently working with a k3s cluster that utilizes Calico for internal networking. In this setup, all cluster nodes are on VLAN 3. However, I'm facing some challenges configuring MetalLB to exclusively use VLAN 15 for publishing services to the internet.
Here's the rundown:
K3s version v1.26.3+k3s1
MetalLB version: v0.13.9
- Objective: I want to keep all cluster nodes on VLAN 3 but use IP address pools from VLAN 15 for service publication via MetalLB.
- Current Setup: MetalLB is configured to assign IP addresses from the designated pool defined in the configuration file.
- Problem: While MetalLB successfully assigns IP addresses, accessing services from the browser is proving to be problematic. Interestingly, running curl http://externalIpAddressOfTheService yields expected results.
- Attempts:
- Added interface for VLAN 15 and configured IP addresses on all nodes.
- Tried adding interface selectors in the L2 configuration file.
- Tested configurations on a single node using node selectors.
- Troubleshooting: Despite various troubleshooting steps, I haven't been able to resolve the issue. (I also checked the firewall, everything seems fine)
Here is the MetalLB configuration file :
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
 name: address-pool
 namespace: metallb-system
spec:
 addresses:
 - X.X.15.112-X.X.15.119
 avoidBuggyIPs: true
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
 name: L2Adv
 namespace: metallb-system
spec:
 ipAddressPools:
 - address-pool
 nodeSelectors:
 - matchLabels:
   kubernetes.io/hostname: kmaster
 interfaces:
 - ens19
I'd greatly appreciate any guidance or insights into resolving this configuration issue with MetalLB and VLANs. Any assistance or suggestions would be greatly appreciated.
Thanks in advance for your help!
Reply all
Reply to author
Forward
0 new messages