It looks like there is a typo in the addresses range in your IPAddressPool manifest. The range 192.168.10.15-192.168.0.250 is invalid because the second IP address (192.168.0.250) is out of the expected sequence compared to the first IP (192.168.10.15). The third octet decreased from 10 to 0, which is not a valid increasing range.
If your intention was to specify a range within the same subnet, both the start and end IPs should have the same first three octets or the range should be continuous.
For example, to specify an address pool from 192.168.10.15 to 192.168.10.250, you should use:
The IP range starts at 192.168.121.82, but you've mentioned that one of your worker nodes is at . This means IP and above may overlap with pods/nodes or other services on your network.
User
giveme all config
Assistant
Certainly! Here is a complete MetalLB configuration YAML that you can apply to your k3s cluster. It includes:
The MetalLB IPAddressPool with a safe IP range (192.168.121.200-192.168.121.250)
An L2Advertisement object to enable Layer 2 mode (simple and works in most home/lab setups)
Here's a correct and minimal MetalLB configuration you should use for your k3s cluster in Layer 2 mode, to ensure MetalLB assigns external IPs and advertises them properly on your network.
IPAddressPool defines the IP range 192.168.121.200-250 that MetalLB can assign.
L2Advertisement advertises only IPs from the default-address-pool. This explicit binding is useful if you have multiple pools and want different advertisements per pool.
Notes:
If you omit the ipAddressPools section (i.e., have an empty ), the advertisement applies to pools.
Certainly! Here is a clean, correct, and recommended MetalLB Layer 2 configuration for your k3s cluster assuming a single IP address pool scenario — the simplest and most widely used setup.
config.vm.network "private_network", ip: "192.168.10.10"
config.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4120"
libvirt.cpus = 2
end
end
Assistant
Sure! I'll guide you step-by-step to install MetalLB on your k3s cluster with your nodes:
Master node: 192.168.121.41
Worker node 1: 192.168.121.80
Worker node 2: 192.168.121.181
Step 1: Install k3s (assuming you already have this done)
You mentioned IPs, so assuming your k3s cluster is installed and working with these nodes joined.
If not installed yet, you can do:
On master (192.168.121.41):
curl -sfL https://get.k3s.io | sh -
On worker nodes:
Get token from master:
sudo cat /var/lib/rancher/k3s/server/node-token
Then run:
curl -sfL https://get.k3s.io | K3S_URL=https://192.168.121.41:6443 K3S_TOKEN=<paste-token-here> sh -
Step 2: Verify k3s cluster
On master node:
kubectl get nodes
You should see:
NAME STATUS ROLES AGE VERSION
192.168.121.41 Ready control-plane,master x vX.Y.Z+k3sX
192.168.121.80 Ready <none> x vX.Y.Z+k3sX
192.168.121.181 Ready <none> x vX.Y.Z+k3sX
Check that MetalLB pods are running in the metallb-system namespace:
kubectl get pods -n metallb-system
You should see:
NAME READY STATUS RESTARTS AGE
controller-xxxxxx-xxxxx 1/1 Running 0 xxm
speaker-xxxxx-xxxxx 1/1 Running 0 xxm
Step 4: Configure MetalLB IPAddressPool and L2Advertisement
You need to create an IP address pool of IPs MetalLB can assign for LoadBalancer services.
Since your nodes are in subnet 192.168.121.0/24, and your machine IPs are .41, .80, .181, choose an IP range outside of these but within the subnet to avoid conflicts, for example:
MetalLB resources like IPAddressPool and L2Advertisement must be created in the metallb-system namespace (which matches your manifest), so this is correct.
Summary
Change your IPAddressPool to a safe range not overlapping with your nodes.
MetalLB will know the pool of IP addresses it can assign.
But it won’t advertise these IPs on the network.
Services get IPs assigned, but external clients won't be able to connect because the network switches/hosts don't know where to route traffic.
The IPs are sort of "invisible" or unreachable from outside the cluster.
What happens if you only create L2Advertisement without IPAddressPool?
MetalLB does not have any IPs assigned to hand out.
No services will get external IPs.
No LoadBalancer IPs.
Therefore:
IPAddressPool is necessary to define the available IP addresses.
L2Advertisement is necessary to make those IP addresses visible and reachable on your local network (Layer 2 mode).
Both together enable MetalLB to manage and deliver external IPs for your Kubernetes services.
TL;DR
Resource
Purpose
Is it needed?
IPAddressPool
Defines the IP range MetalLB can assign
Yes
L2Advertisement
Advertises those IPs on the local Layer 2 network
Yes
Bonus
If you want to use the more advanced BGP mode, the equivalent BGPAdvertisement object is provided instead of L2Advertisement. But BGP setup is more complex and requires a BGP network infrastructure.
Let me know if you want a practical example of configuring either mode!
How to apply:
kubectl apply -f metallb-config.yaml
If you want only this (no L2Advertisement), MetalLB will assign IPs but those IPs won't be reachable externally.
Summary
Resource
Purpose
Must Have?
IPAddressPool
Defines IP address range MetalLB manages
Yes
L2Advertisement
Announces assigned IPs via Layer 2 network
Yes, for normal L2 mode
Feel free to ask further if you want to see how to deploy nginx with LoadBalancer service to validate!
.80
.181
.190
Namespace:
metallb-system is the default namespace MetalLB runs in — make sure MetalLB components are deployed in that namespace.
Check assigned external IP (should be in your 192.168.121.190-250 range).
Try accessing the IP from within your LAN (e.g., curl http://192.168.121.xxx).
If everything is set up properly, MetalLB will assign IPs from your pool and announce them via Layer 2, enabling access to your LoadBalancer services.
If you face any problems, send logs or error messages, and I can help troubleshoot!
spec: {}
all
Explicitly mentioning the pool like you did is fine and sometimes recommended for clarity/scoping.
To apply:
kubectl apply -f metallb-config.yaml
Then test by creating a LoadBalancer service.
Summary
Your config is valid and perfectly fine for typical MetalLB Layer 2 setup.
If you want me to help with any further steps, let me know!
Great question! Both configurations are valid, but they have subtle differences that affect how MetalLB advertises IP addresses and how granularly you control the behavior.
Let's compare the two:
1) Configuration with explicit IPAddressPool reference in L2Advertisement
What it does:
The L2Advertisement advertises all IPAddressPools present in the metallb-system namespace.
Effect:
If you add more IPAddressPools, they automatically get advertised by this L2Advertisement.
Use case:
Simple setups where you want to advertise all IPs without managing each pool separately.
Summary comparison table
Aspect
With explicit ipAddressPools
Without ipAddressPools (empty spec)
IP pools advertised
Only the named pools in ipAddressPools
All pools in the namespace
Configuration complexity
Slightly more complex (need to update L2Advertisement if you add pools)
Simpler, auto-advertises all pools
Flexibility
High (per-pool advertisement control)
Lower (broadcasts all pools)
Recommended for
Multi-pool setups, multi-tenant clusters
Single-pool/simple environments
Which is better and why?
If you only have one IPAddressPool, both are effectively the same, so use whichever you prefer.
For simple or small setups, the empty spec (spec: {}) is easier and less to maintain.
For advanced or multi-pool environments, specifying pools explicitly gives better control and avoids unintended advertisements.
Practical advice:
Start simple with the second form (spec: {}).
When your requirements grow (e.g., needing different pools for different environments or networks), switch to explicit ipAddressPools references.
If you want, I can help you design a config for your specific cluster needs!
Certainly! Let me explain this piece:
spec:
ipAddressPools:
- default-address-pool
What is this?
This snippet is part of a MetalLB L2Advertisement resource specification.
It tells MetalLB which IPAddressPools should be advertised by this particular L2Advertisement.
Breaking it down:
spec: — The main specification section of the resource.
ipAddressPools: — A list (array) of IPAddressPool names.
- default-address-pool — The name of one IPAddressPool resource (here, named default-address-pool) this advertisement applies to.
What does it do?
MetalLB supports having multiple IPAddressPools (e.g., "pool1", "pool2").
This allows you to define separate pools of IP addresses (maybe in different subnets or for different users/services).
When you create an L2Advertisement, you need to tell MetalLB which pool(s) of IPs you want to advertise to your Layer 2 network.
By specifying:
ipAddressPools:
- default-address-pool
You tell MetalLB:
"Only advertise IPs assigned from the IPAddressPool named default-address-pool."
This controls traffic announcements, such as ARP or NDP, specifically for that pool's addresses.
Why is this useful?
Granular control: You can have different advertisements for different pools.
Multi-tenant or multi-network scenarios: You might want to advertise some pools differently or limit exposure.
Avoid advertising IPs unintentionally: If you omit this field (empty spec: {}), MetalLB advertises IPs from all pools it knows of, which might not always be desired.
MetalLB CRDs define these exactly, so you must use the full correct resource names.
Example output (your environment, after MetalLB config is applied)
kubectl get ipaddresspools -n metallb-system
NAME AGE
default-address-pool 10m
kubectl get l2advertisements -n metallb-system
NAME IPADDRESSPOOLS AGE
default-l2-advertisement default-address-pool 10m
Summary
Use the following commands to inspect MetalLB custom resources:
kubectl get ipaddresspools -n metallb-system
kubectl get l2advertisements -n metallb-system
If you want, I can help you interpret the outputs or help troubleshoot further!
Great! Your curl http://192.168.121.201from your master node works and returns the nginx welcome page, confirming MetalLB assigned the IP and nginx is responding.
But you cannot access the same IP from your laptop? Here's why and how to fix it:
Common reasons why your laptop cannot access that IP:
1. Network routing / connectivity
Is your laptop on the same Layer 2 network / subnet as the cluster nodes (192.168.121.0/24)?
Check your laptop IP and subnet mask:
On Windows: ipconfig
On Linux/macOS: ifconfig or ip addr
They should be something like 192.168.121.x with subnet 255.255.255.0.
2. Firewall blocking
Check if firewall on Kubernetes nodes, especially master or workers, block incoming traffic to ports/addresses you want.
On your nodes, check iptables or firewalld (if any):
4. Your network switch/router does not handle or allow this ARP
Some managed switches or WiFi routers isolate clients or filter ARP requests for IPs not assigned to physical NICs.
MetalLB in Layer 2 mode depends on ARP/NDP announcements to "claim" the IP.
Your laptop might be unable to reach the IP because your network infrastructure blocks these ARP announcements or isolates wireless from wired clients.
How to check
Try connecting your laptop via wired interface to the same switch/network as your k3s nodes.
Alternatively, check router settings to allow ARP broadcast or disable "client isolation" or "AP isolation" on WiFi.
5. IP conflict
Double-check that no other device on network uses 192.168.121.201.
Conflicts cause intermittent failures.
How to debug and fix step-by-step:
Step 1: Confirm laptop network configuration
ip addr show # Linux/macOS
ipconfig # Windows
Must be 192.168.121.x with subnet mask 255.255.255.0.
If ping fails, network connectivity problem or firewall.
Step 2: Ping the MetalLB IP
ping 192.168.121.201
If ping fails, ARP request may not be answered.
Step 3: Check ARP entries on laptop
On laptop, run:
arp -a
Look for 192.168.121.201 MAC address entry.
If none — laptop does not see MetalLB announcing the IP.
Step 4: Temporarily disable firewalls on nodes and laptop to test
On nodes — flush iptables or stop firewalls temporarily.
On laptop — disable local firewall.
Step 5: Wireshark / tcpdump ARP inspection
Capture ARP traffic on laptop or on one node to see if ARP requests for .201 and MetalLB replies appear.
Summary
The nginx service is working and MetalLB assigned IP correctly, but your laptop can't reach the IP because:
Network layer 2 connectivity or ARP announcements are blocked
Firewall(s) block the traffic
Network switch or WiFi isolates clients
If you want me, I can help you with specific commands to check these or suggest alternative MetalLB modes (like BGP or Layer 3) if your network setup makes Layer 2 mode challenging.
Feel free to share your laptop network details and any error messages — I can help diagnose further!
vagrant@Master:kubectlgetipaddresspools−nmetallb−systemkubectlgetl2advertise ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:b4:9a:4c brd ff:ff:ff:ff:ff:ff
altname enp0s5
altname ens5
altname enx525400b49a4c
inet 192.168.121.41/24 brd 192.168.121.255 scope global dynamic noprefixroute eth0
valid_lft 2538sec preferred_lft 1964sec
inet6 fe80::9ec6:29cb:ea82:3ebe/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:f4:6a:e6 brd ff:ff:ff:ff:ff:ff
altname enp0s6
altname ens6
altname enx525400f46ae6
inet 192.168.10.10/24 brd 192.168.10.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fef4:6ae6/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
4: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default
link/ether 56:cd:4f:69:ab:61 brd ff:ff:ff:ff:ff:ff
inet 10.42.0.0/32 scope global flannel.1
valid_lft forever preferred_lft forever
inet6 fe80::54cd:4fff:fe69:ab61/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
5: cni0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default qlen 1000
link/ether 26:db:c6:82:1e:2c brd ff:ff:ff:ff:ff:ff
inet 10.42.0.1/24 brd 10.42.0.255 scope global cni0
valid_lft forever preferred_lft forever
inet6 fe80::24db:c6ff:fe82:1e2c/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
8: veth9d401c3f@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether 26:59:9d:89:ae:1c brd ff:ff:ff:ff:ff:ff link-netns cni-a10be5d6-5f4d-ffab-28b9-36aad3a7a22a
inet6 fe80::2459:9dff:fe89:ae1c/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
9: vethc9d19ab3@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether 32:79:43:f7:5b:4b brd ff:ff:ff:ff:ff:ff link-netns cni-a4699b7d-eb4a-8fa4-7f0a-487d39b13222
inet6 fe80::3079:43ff:fef7:5b4b/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
10: vethfb05521c@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether e6:fa:97:a7:63:a7 brd ff:ff:ff:ff:ff:ff link-netns cni-f44ff15d-9f9e-d875-c781-c4ed4a522a71
inet6 fe80::e4fa:97ff:fea7:63a7/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
11: veth289ef49f@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether ae:15:a4:dd:ee:dd brd ff:ff:ff:ff:ff:ff link-netns cni-67102419-097e-aab4-7d75-84c32bed1f5a
inet6 fe80::ac15:a4ff:fedd:eedd/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
12: veth9dcffbd6@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether 16:16:ef:64:62:29 brd ff:ff:ff:ff:ff:ff link-netns cni-cd4ae1b9-acb3-a5bd-8711-a6c6835ff77a
inet6 fe80::1416:efff:fe64:6229/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
13: veth0f8a14ce@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default qlen 1000
link/ether c2:e1:38:03:06:af brd ff:ff:ff:ff:ff:ff link-netns cni-26ea45c3-2202-c039-a2f7-b77bee0864d9
inet6 fe80::c0e1:38ff:fe03:6af/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
vagrant@Master:$
Thanks for the details! Here's what I see and some important comments:
What you shared:
Your MetalLB resources:
kubectl get ipaddresspools -n metallb-system
NAME AUTO ASSIGN AVOID BUGGY IPS ADDRESSES
default-address-pool true false ["192.168.121.200-192.168.121.250"]
kubectl get l2advertisements -n metallb-system
NAME IPADDRESSPOOLS IPADDRESSPOOL SELECTORS INTERFACES
default-l2-advertisement
Your node’s ip addr shows interface eth0 has IP 192.168.121.41/24, which is the correct subnet as your MetalLB pool.
Also, you have eth1 on 192.168.10.10/24 which is a different subnet (likely unrelated here).
Important observation:
Your L2Advertisement shows no IP pools explicitly assigned (empty spec), which means it advertises all IP pools found in the namespace — so this is expected and okay.
Next steps & things to verify:
Your MetalLB setup looks correct.
Verify that your LoadBalancer service has an external IP assigned from the pool:
kubectl get svc nginx
Make sure EXTERNAL-IP is inside your pool range.
Why might your laptop still not reach that IP?
You have eth0 on 192.168.121.41/24 — so your master node is on the same subnet as your MetalLB IP range.
From your earlier tests, you can curl the assigned IP (192.168.121.201) from the master node, but not from the laptop.
The most common cause for that is network-level ARP issues or firewall rules blocking Layer 2 announcements or traffic.
What can you do next?
Check ARP resolution on your laptop:
From your laptop, see if ARP resolves the MetalLB IP.
arp -a 192.168.121.201
You should see the MAC address of one of your cluster nodes (the node advertising the IP).
If no entry, the laptop cannot find the IP via ARP, likely blocked on network layer.
Test ping from laptop:
ping 192.168.121.201
Confirm if packet loss.
On each node, check if MetalLB speaker is running:
kubectl get pods -n metallb-system -o wide
Should see speaker on each node, including on nodes the service is running on.
Check for firewall rules on nodes:
sudo iptables -S
sudo iptables -L -n
Look for rules blocking traffic to 192.168.121.200-250
If you are using WiFi:
Wireless networks sometimes isolate clients and block ARP broadcasts for other clients. Test with a wired connection on the laptop in the same subnet, if possible.
Summary:
Your MetalLB config and pool look good.
Your node IP and MetalLB IP pools are in the same subnet.
Curl works from the node, but laptop cannot reach IP => likely network-layer issue (ARP, firewall, client isolation).
Check ARP resolution and firewalls.
Possibly test connecting your laptop wired to the same switch.
If you want help interpreting specific logs or outputs, or suggestions for alternative MetalLB networking modes (e.g., BGP), just ask!
Thanks for the info! Since you’ve created 3 Vagrant virtual machines running under KVM, here are some key considerations and tips to ensure MetalLB works correctly in your environment:
Key Points for MetalLB with Vagrant + KVM VM setup
1. Networking mode of your VMs
Your VM’s network interface mode greatly affects MetalLB’s Layer 2 advertisement working properly.
Common modes:
Bridged networking: VMs get IPs directly on your LAN subnet, MAC addresses are visible on the physical network interface.
Best for MetalLB L2 mode because ARP announcements from speakers reach the entire LAN.
NAT networking (default in many Vagrant setups):
VMs get IPs in a private subnet NATed by host.
MetalLB Layer 2 announcements usually won't work across NAT boundaries because ARP broadcasts don’t transit NAT.
Host-only networking:
VMs and host communicate but usually isolated from broader LAN.
Useful for isolated clusters, but external access from other LAN devices is limited.
Check your Vagrantfile how network is configured for each VM.
2. For MetalLB Layer 2 mode to work:
You need bridged networking configured on your VMs, connected to the same physical network as your laptop.
That way, all VMs and your physical laptop are in the same subnet and can exchange ARP broadcast packets.
Example Vagrantfile snippet for bridged interface on libvirt/KVM:
config.vm.network "public_network", bridge: "br0"
Where "br0" is your host’s bridge interface connected to the physical LAN.
3. Verify connectivity inside the VM network
From your laptop, ping each VM IP (e.g., 192.168.121.41, 192.168.121.80, 192.168.121.181).
If ping or ARP fails, the VM network isn’t bridging correctly.
If your laptop can't ping VMs or ARP their IPs, Layer 2 MetalLB announcements won't reach your laptop.
4. If bridging is difficult or unavailable
You can consider using MetalLB in BGP mode — if your virtual network/router supports BGP.
Or use port forwarding and NodePort services (less elegant).
5. Firewall considerations
Ensure no host or VM firewall blocks:
ARP packets
Traffic to MetalLB IP pool (e.g., 192.168.121.200-250)
Inside VMs, disable firewalls temporarily for testing (sudo systemctl stop firewalld or flush iptables).
Example checklist
Edit your Vagrantfile to use bridged/public_network:
Vagrant.configure("2") do |config|
config.vm.define "master" do |node|
node.vm.network "public_network", bridge: "br0"
# other configs...
end
config.vm.define "worker1" do |node|
node.vm.network "public_network", bridge: "br0"
end
config.vm.define "worker2" do |node|
node.vm.network "public_network", bridge: "br0"
end
end
vagrant reload your VMs so they get bridged IPs.
Verify your laptop and VMs are in the same subnet and can ping each other.
MetalLB Layer 2 mode should now work as intended, and you can reach the LoadBalancer IPs from your laptop.
Summary
MetalLB Layer 2 depends heavily on VM network bridging and ARP support across the physical network.
If your VM NICs are NAT or isolated, MetalLB external IPs won’t be reachable from your laptop.
Use bridged networking in Vagrant + KVM.
Disable firewalls during initial testing.
You can also explore BGP mode if your network supports it.
If you want, I can help you write a sample Vagrantfile with bridged networking or help troubleshoot your current VM network setup!
Thanks for sharing your Vagrantfile! Based on what you posted, your VM is currently configured with:
This means your VM is using a private (host-only or NAT) network, not bridged to your physical LAN.
Why this causes issues with MetalLB Layer 2 in your setup:
Private networks isolate your VM from your physical LAN.
The MetalLB Layer 2 mode relies on ARP broadcasts being visible on the entire LAN.
Since your VM is on a private subnet (192.168.10.0/24) and your laptop probably on your physical network subnet (192.168.121.0/24), they are isolated.
So MetalLB assigns IPs on the 192.168.121.x subnet (your MetalLB pool), but your VM only has an IP on 192.168.10.10 subnet.
This subnet mismatch + isolation makes services unreachable from your laptop.
How to fix this:
You should switch your VM network from a private_network to a bridged (public_network) so your VM gets an IP directly on your physical LAN subnet (192.168.121.x).
Example modified Vagrantfile snippet for bridged networking (with libvirt):
Vagrant.configure("2") do |config|
config.vm.box = "aalmenar/debian-13"
config.vm.define "Master" do |machine|
machine.vm.hostname = "Master"
# Change from private_network to public_network (bridged)
machine.vm.network "public_network", bridge: "br0"
machine.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4120"
libvirt.cpus = 2
end
end
end
Explanation:
public_network tells Vagrant/libvirt to connect the VM NIC to a bridge on the host.
bridge: "br0" assumes you have a Linux bridge interface named br0 on your host already connected to your physical network.
You can check your bridge name with ip a or brctl show.
When bridged, your VM gets an IP from your physical LAN’s DHCP server or can assign static IPs in that subnet.
This places your VMs, laptop, and MetalLB IP pools on the same L2 broadcast domain, enabling ARP and Layer 2 MetalLB to work.
What you should do next
Setup a bridge on your Linux host if not already.
Example to create a bridge on Linux host:
sudo ip link add name br0 type bridge
sudo ip link set br0 up
sudo ip link set enp3s0 master br0 # replace enp3s0 with your physical interface
sudo dhclient br0
Update your Vagrantfile as above.
Run:
vagrant reload Master
Check VM IP with ip addr inside the VM — should be in 192.168.121.x subnet.
Reapply MetalLB config with IP pool in 192.168.121.200-250.
Test again LoadBalancer services from your laptop.
If you want multiple VMs defined, you can do:
Vagrant.configure("2") do |config|
config.vm.box = "aalmenar/debian-13"
# Master Node
config.vm.define "Master" do |machine|
machine.vm.hostname = "Master"
machine.vm.network "public_network", bridge: "br0"
machine.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4120"
libvirt.cpus = 2
end
end
# Worker 1
config.vm.define "Worker1" do |machine|
machine.vm.hostname = "Worker1"
machine.vm.network "public_network", bridge: "br0"
machine.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4120"
libvirt.cpus = 2
end
end
# Worker 2
config.vm.define "Worker2" do |machine|
machine.vm.hostname = "Worker2"
machine.vm.network "public_network", bridge: "br0"
machine.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4120"
libvirt.cpus = 2
end
end
end
Summary
Switch to public_network (bridged) so VMs get IPs on your physical LAN.
This enables MetalLB L2 mode to work fully—your laptop and VMs will be on the same subnet and exchange ARP properly.
MetalLB IP allocation will match the VM network subnet and be reachable.
Let me know if you want help setting up the Linux bridge or modifying your Vagrantfile further!