metallb load balancer ip address range
Asked Answered
F

1

6

I have a Kubernetes installation on-premise and it seems to be working fine.

I am now trying to install MetalLb to use load-balancer service. Our network guy gave me IP ranges of 11.240.15.192/27 which can be used for Kubernetes cluster load-balancing service.

My cluster runs on 11.211.220.X and I have one master and three worker nodes.

My question is, what do I need to provide as IP range in config map of a MetalLb load balancer? Do I need to physically attach call those IP to any of the nodes before MetalLb can use it to hand-ver IP addresses for my service?

These questions are never being answered.. All the setup either use MiniKube or installation in local network where 192.168.X.X range is fully available.

When I assigned 11.240.15.192-11.240.15.223 to configmap and created a service of type load balancer, it was still in External IP was still in Pending state for a while. I then Applied changes manually to the service as follows:

...
spec:
  type: LoadBalancer
  externalIPs:
  - 11.240.15.192

It still couldn't connect my sample nginx deployment on port 80

Then to experiment with it, I changed "ExternalIps" to one of the Kubernetes Node IP address and now I can access Nginx index page. This raises a big concern since I only have three worker nodes and I probably can run only three services on port 80 using up IP address of each node.

Can someone please guide me where exactly I need to make changes so that I can use whole range of IP addresses?

Flex answered 6/10, 2020 at 17:54 Comment(1)
Not sure if you have fixed this but I came here with the same problem - metalLB wasn't assigning addresses. After 2 whole days of trying to fix this, I realised the problem was as simple as a typo - "Protocol" instead of "protocol". I found this by checking the logs of the metalLB controller pod and spotting an "error in parsing of config" error message. If your config is set up correctly then your service should be given an external IP from the range you provide in the configFeingold
O
-1

I guess you don't have to assign the external IP, It will be assigned automatically from the pool you assigned and in sequence.

Outsoar answered 6/12, 2020 at 14:39 Comment(1)
apologies for the downvote - technically though this doesn't answer OP's question and they have already stated that they have setup metalLB to get from a pool of addresses and it isn't working.Feingold

© 2022 - 2024 — McMap. All rights reserved.