Using MetalLB as Kubernetes load balancer with Ubiquiti EdgeRouter

Picocluster 5E
The network setup
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
peers:
- peer-address: 192.168.1.1
peer-asn: 64512
my-asn: 64512
address-pools:
- name: default
protocol: bgp
addresses:
- 192.168.1.224/27
configure
set protocols bgp 64512 parameters router-id 192.168.1.1
set protocols bgp 64512 neighbor 192.168.1.201 remote-as 64512
set protocols bgp 64512 neighbor 192.168.1.202 remote-as 64512
set protocols bgp 64512 neighbor 192.168.1.203 remote-as 64512
set protocols bgp 64512 neighbor 192.168.1.204 remote-as 64512
set protocols bgp 64512 maximum-paths ibgp 32
commit
save
exit
show ip bgp neighbors
BGP neighbor is 192.168.1.201, remote AS 64512, local AS 64512, internal link
BGP version 4, remote router ID 192.168.1.201
BGP state = Established, up for 00:38:08
Last read 00:38:08, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised
4-Octet ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Address family IPv6 Unicast: received
Received 1790 messages, 0 notifications, 0 in queue
Sent 1779 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 35, neighbor version 35
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
1 accepted prefixes
0 announced prefixes
Connections established 5; dropped 4
Local host: 192.168.1.1, Local port: 179
Foreign host: 192.168.1.201, Foreign port: 44153
Nexthop: 192.168.1.1
Nexthop global: xxxx:xxxx:xxx:xxxx::x
Nexthop local: fe80::f29f:c2ff:fe12:428
BGP connection: non shared network
show ip route bgp
IP Route Table for VRF “default”
B *> 192.168.1.224/32 [200/0] via 192.168.1.205, eth1, 00:00:04
B *> 192.168.1.225/32 [200/0] via 192.168.1.203, eth1, 00:08:04
*> [200/0] via 192.168.1.201, eth1, 00:08:04
B *> 192.168.1.226/32 [200/0] via 192.168.1.205, eth1, 00:08:04
*> [200/0] via 192.168.1.202, eth1, 00:08:04
*> [200/0] via 192.168.1.201, eth1, 00:08:04
B *> 192.168.1.227/32 [200/0] via 192.168.1.205, eth1, 00:00:04
Gateway of last resort is not set

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store