[RHOCP 4] MetalLB does not assign IP Address to Service of type LoadBalancer
Issue
- Is there a way to configure
MetalLB
in a way that it should only allocateIP addresses
to specificservices
, and restrict allocation ofIP addresses
from theMetalLB IP address pool
for any otherservice
? - How to restrict
services
of typeLoadBalancer
(newly created or existing one) to not allocate anIP address
from theMetalLB IP address pool
? -
When creating a
service
of typeLoadBalancer
,ExternalIP
showspending
state, andMetalLB controller
pod logs showno available IPs in pool
$ oc get svc -n kuard NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kuard LoadBalancer 172.xx.xx.xx 10.xx.xx.xxx 80:32321/TCP 8d kuard-blue LoadBalancer 172.xx.xx.xxx 10.xx.xx.xxx 8080:32325/TCP 8d kuard-green LoadBalancer 172.xx.xx.xx <pending> 8080:30700/TCP 8d kuard-purple ClusterIP 172.xx.xx.xx <none> 8080/TCP 8d $ oc logs controller-xxxx-xxx -c controller -n metallb-system {"caller":"service_controller.go:60","controller":"ServiceReconciler","level":"info","start reconcile":"kuard/kuard-green","ts":"2023-01-19T15:59:40Z"} {"caller":"service.go:140","error":"no available IPs in pool \"metallb-pool\" for ipv4 IPFamily","level":"error","msg":"IP allocation failed","op":"allocateIPs","ts":"2023-01-19T15:59:40Z"} {"caller":"service_controller.go:103","controller":"ServiceReconciler","end reconcile":"kuard/kuard-green","level":"info","ts":"2023-01-19T15:59:40Z"}
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.