Baremetal problem with MetalLB

Hi,

I have an absolutely clean install of Rancher Rancher v2.5.9 on top of RancherOS 1.5.6 running on a small baremetal homelab server. My Rancher install command from ROS was :

docker run -d --privileged --log-driver=none --restart=unless-stopped -p 8080:80 -p 8443:443 -v /mnt/docker/rancher-data:/var/lib/rancher rancher/rancher:latest

I set up Rancher to have the default login, a password andused the resulting GUI to only support the single local cluster. That’s the limit of the setup I performed to the bare Rancher install.

I am trying to get a working homelab using MetalLB and have tried several YouTube tutorials including the following :

Kubernetes 101: Why You Need To Use MetalLB

I get as far as 10’55" where you click the IP address of the demo app. The browser opens to the IP address as expected but the demo app does not appear and the browser times out. The result I get of running the “kg service” corresponds to what is shown at 11’03" , ie MetalLb is allocating the lowest IP in its permitted range as wanted. Pings to the MetalLB allocated LAN IP time out. Any ideas ?

I also tried the following Self-Hosting Your Homelab Services with SSL – Let’s Encrypt, MetalLB, Traefik, Rancher, Kubernetes with basically the same result :

Although MetalLB is apparently handing out IP addresses OK, the service (Traefik Dashboard in this case) seems not to be receiving the corresponding ethernet traffic to the allocated IP.

I have tried various things at the LAN level like eg setting up a HOSTS file on the host I am connecting from, adding static Hostname entries on the LAN router (OpenWRT 17.07.8 on HomeHub5A), setting Static leases for the “traefik.example.com” domain for the second video. I have even set an ARP entry for the MetalLB allocated IP and Rancher Server MAC but nothing comes alive for the MetalLB allocated IP.

The MetalLB config.yaml I apply is as follows:

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.1.38-192.168.1.45

Any ideas what I am doing wrong here ?

Maybe the issue could be you’re using RancherOS? That’s super old and not maintained anymore. If you’re tyring to get a recent version of MetalLB going, it’s likely going to have issues with an older version of Kubernetes. I suggest starting a new cluster with K3S, I haven’t used K3S yet, but it’s better for smaller deployments. There are a bunch of good official Rancher tutorials/videos on YouTube.