Hmm, I think I am misunderstanding how L2 advertisement works. As a
test, I configured the sub-interfaces for each vlan on my worker node,
then updated my l2adverisements to be limited to the appropriate
interface.
For clarity, here is the snippet from my config:
```
apiVersion:
metallb.io/v1beta1kind: IPAddressPool
metadata:
name: server
namespace: metallb-system
spec:
addresses:
- 10.10.40.15-10.10.40.20
---
apiVersion:
metallb.io/v1beta1kind: IPAddressPool
metadata:
name: infra
namespace: metallb-system
spec:
addresses:
- 10.10.50.15-10.10.50.20
---
apiVersion:
metallb.io/v1beta1kind: L2Advertisement
metadata:
name: server
namespace: metallb-system
spec:
ipAddressPools:
- server
nodeSelectors:
- matchLabels:
kubernetes.io/hostname: worker1
interfaces:
- br0.40
---
apiVersion:
metallb.io/v1beta1kind: L2Advertisement
metadata:
name: infra
namespace: metallb-system
spec:
ipAddressPools:
- infra
nodeSelectors:
- matchLabels:
kubernetes.io/hostname: worker1
interfaces:
- br0.50
```
I've deployed a test pod with the `
metallb.universe.tf/address-pool: server` annotation. I've confirmed it is using the correct "server" address pool yet, I don't have connectivity to the assigned IP. If I get a shell into the pod, I do have connectivity. I ran a tcpdump on the host and found that the traffic is going out of the br0.50 interface instead of br0.40. Because of this behavior, I tried another test pod in the "infra" ip address pool. The traffic also went out br0.50 so I have connectivity as expected. On the worker node, br0.50 is configured with an IP address as it is the management interface. There is no IP assigned for br0.40. Does metallb require the network interface have an IP to work with an L2 advertisement?
Thanks,
Luke Davidson