techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.

Home Page:https://technotim.live/posts/k3s-etcd-ansible/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

metallb fails a few minutes after it starts when flannel interface is wlan

mihai-dinculescu opened this issue · comments

When flannel interface is wlan, metallb fails a few minutes after it starts.

Expected Behavior

LoadBalancer services work.

Current Behavior

LoadBalancer services stop being reachable a few minutes after the cluster starts.

Steps to Reproduce

  1. ansible-playbook site.yml -i inventory/my-cluster/hosts.ini
  2. Create an ingress or a LoadBalancer service

Context (variables)

Operating system:
Ubuntu Server 23.10

Hardware:
Raspberry Pi 5.

Variables Used

all.yml

k3s_version: "v1.28.3+k3s1"
ansible_user: NA
systemd_dir: "/etc/systemd/system"

flannel_iface: "wlan0"

apiserver_endpoint: "192.168.1.190"

k3s_token: "NA"

extra_server_args: "no changes from master"
extra_agent_args: "no changes from master"

kube_vip_tag_version: "v0.5.12"

metal_lb_speaker_tag_version: "v0.13.9"
metal_lb_controller_tag_version: "v0.13.9"

metal_lb_ip_range: "192.168.1.210-192.168.1.220"

Hosts

host.ini

[master]
io.local

[node]

[k3s_cluster:children]
master
node

Possible Solution

Setting the wlan0 interface to work in promiscuous mode solves the issue.

sudo ifconfig wlan0 promisc

This setting is being lost on restart, so a @reboot sudo ifconfig wlan0 promisc crontab is required as well.