https://turingpi.com logo
#│forum
BMC load balancing control
# │forum
r

riccardopet

06/03/2023, 11:57 AM
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

inquisitor_1337

06/05/2023, 1:53 PM
Check metalLB
r

riccardopet

06/05/2023, 8:07 PM
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?
u

_dhanos_

06/05/2023, 8:09 PM
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

werdnum

06/05/2023, 9:19 PM
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
u

_dhanos_

06/06/2023, 3:47 AM
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

inquisitor_1337

06/06/2023, 5:47 AM
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

riccardopet

06/07/2023, 7:11 PM
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

werdnum

06/07/2023, 11:10 PM
nope
that shouldn't be happening
I would check your node IPs and the BMC IP
r

riccardopet

06/08/2023, 9:17 AM
Thank you... I ll test it again installing everything from scratch 🙂
w

werdnum

06/08/2023, 10:41 AM
Can you check the IPs?
I gotta know how this happened now 😄
j

j0jux

06/08/2023, 5:05 PM
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

riccardopet

06/09/2023, 2:47 PM
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

j0jux

06/18/2023, 2:32 PM
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

riccardopet

06/18/2023, 3:22 PM
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