I want to have three masters and five workers, and I want to respond to one million request per second so my network should design carefully for a highly available control plane I install:
> haproxy
and
> keepalive
on three masters.
But I want the request to go to the worker directly so I need
> loadbalancing
traffic to 5 workers. How can I do that? Please may someone suggest any ideas?
> metalLB
But I think there should be a simpler way. Does anyone use:
> metalLB
Does anyone have any other suggestions?
I would use metalLB for providing a service of type loadbalancer, then I would create a ingress controller in order to have just one loadbalancer for the nodes.
MetalLB -->>>> Ingress - >>>>>> Microservice
Follow the below flow for load balancing the workers
Load balancer------ingress controller - - - - - - - apps running on the workers
If you are not running your cluster on a Cloud and you want to have a LoadBalancer, then you will need to use MetalLB. This is not complex at all.
You can install MetalLB via Kubernetes Manifest, like:
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.7.3/manifests/metallb.yaml
or via Helm Chart
helm install --name metallb stable/metallb
Then, you will need a MetalLB config file and inside of it, addresses
parameter should match the IP scheme of the network you are connected to with subnet. LoadBalancer IP addresses will be distributed from this range. Something like below:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: metallb-system
protocol: layer2
addresses:
- 192.168.1.240/28
I hope it will be useful