Set up a load balancer to distribute incoming traffic to the apps running on your Kubernetes cluster
Install with Helm
Create an IPAddressPool
IPAddressPool
is a range of IP addresses that MetalLB will use to assign IP addresses to the load balancer services. You can use your own server’s IP addresses or get additional IPs if you prefer.The IPAddressPool requires an IP range, but we can also add the IPs of our worker nodes, which isn’t the best for a production environment but not a different process from doing with additional IPs.So let’s say our Kubernetes worker nodes IPs are 160.202.129.150
, 160.202.145.233
, and 197.187.133.133
. Make note of these IPs and create a file named ipaddresspool.yaml
on your local machine.Each Latitude.sh server has its own /31 VLAN, so we need to create an IPAddressPool for each server. Make sure to replace the IP addresses with the IPs of your worker nodes.Create L2Advertisements
l2advertisement.yaml
with the following content.Make sure everything is working
Create load balancer service
Set the load balancer settings
k8s-guide.my-domain.com
.