BMC load balancing control
# │forum
r
I installed k3s on one of the node on the TP2 and I am using NGINX as ingress controller. Without any setup the ingress IP is automatically the same as the one of the BMC. This is somehow amazing (and unexpected). The only drawback is that every time I want to make an HTTP request to the BMC, this gets intercepted by nginx and end up with a "not-found" error. Is there any documentation on how to control the load-balancer and what is actually load-balancing? 🙂 Thank you very much! Riccardo
i
Check metalLB
r
mmm no, I am saying that wihtout any configuration, NGINX uses the BMC address as the ingress instead of the address of one of the noes... is this expected?
d
I know nearly not enough about k3s and Kubernetes in general, but this is not Nginx which uses an IP. An app like this cannot just use an IP. This IP had to be assigned to a node. When setting IP addresses, you always need to use these outside of the range of the DHCP in your router
w
Yeah there is something funny going on with your configuration
You presumably set the IP to the same as the BMC
The IP of the node
The default k3s LoadBalancer is Klipper, which just listens to the relevant port on all nodes
It's fairly common for DHCP to refuse to assign an IP address it's recently seen on ARP, too
d
But then the BMC gets it's IP first (it's network interface appears in the network first, then the nodes with statically-configured IPs) 🙂
i
VladoPortos have a nice starting tutorial regarding networking https://help.turingpi.com/hc/en-us/articles/8942935354013-Network-setting
Traefik is a pre-installed component in the Kubernetes cluster
in k3s traefik as loadbalancer comes pre-installed
r
I am using NGINX as. a ingress controller. Even in case I set somewhere by mistake that the IP of the ingress was the same as the one of the bmc, the bmc, the IP of the BMC was redirected to the NGINX controller.... This is why I was imagining that the BMC was somehow working as a loadbalancer for the nodes...
w
nope
that shouldn't be happening
I would check your node IPs and the BMC IP
r
Thank you... I ll test it again installing everything from scratch 🙂
w
Can you check the IPs?
I gotta know how this happened now 😄
j
if the OS on the BMC itself would understand IPVS it could do some cheap loadbalancing on layer 2, by MAC rewrite, the mode is "DirectRouting" in IPVS. In this case the Pis and the BMC need to be on the same L2 segment. And only the SYN and ACK packets are seen by the BMC, and the data is flowing via the switch directly to the client. Nearly no work for the CPU of the BMC.
note: some k8s CNIs use that too internally
have a look at the documentation and used IP ranges of your loadbalancer and ingress controller to set non collliding IPs
r
The IP are assigned directly from the router using dhcp but they are static. The IPs are 10.1.10.200/1/2/3/4. When you say non-colliding you mean in different networks?
ok... that was my fault 😄
I wrote an ansible playbook one year ago... and in that playbook I set-up metallb using the same address as the BMC to create a lb 😄
so... sorry to create this thread 🙂
j
that what I meant, the assignment vioa DHCP cannot be changed except for the DHCP server. But the range MetalLB uses is declared in the config structures you write 🙂 good that you found it
r
Yep... I thought I was using metallb only for the kube api... But nginx was there too 🙂
Thank you for your help anyway!
6 Views