Load Balancer Services Always Show EXTERNAL-IP Pending

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version:
1.17
Cloud being used: (put bare-metal if not on a public cloud)
bare-metal
Installation method:
Host OS:
Centos 7
CNI and version:
Kamel
CRI and version:

I am trying to get a load balancer service to show a non-pending EXTERNAL-IP.

I’ve been working with the “kubia” services found in the “Kamel In Action” book.

In the following we see my service pending.

[dsargrad@tonga svc]$ k get svc
NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                                                                                                                   AGE
kubernetes           ClusterIP      10.96.0.1       <none>        443/TCP                                                                                                                                                                   90d
kubia-svc-exp        LoadBalancer   10.96.193.165   <pending>     8080:30123/TCP                 

I’ve got a bare-metal cluster.

I’ve tried to install the MetalLB loadbalancer.

In fact, the resources seem to be up and running.

Yet, my services still show pending.

Can someone please guide me through getting a loadbalancer such as MetalLB up and running and integrated…

As mentioned, it seems to be running, and yet k8s is not interacting with it in a fashion that allows the EXTERNAL-IP to be allocated.

Ok. I actually missed one piece. A configmap was required to allow metallb to allocate an IP. See here

So now my service is not pending.

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.1.240-192.168.1.250

So now I’m not pending

Of course the IP address range that I selected is not correct.

I am still trying to understand how k8s knew to call out to the load balancer service. Can someone point me to a detailed description of how k8s integrates such a load balancer into the architecture?

All I’ve found on line (other than this metallb) are descriptions of how to create LoadBalancer services (not how to integrate bare metal loadbalancers).

I’m trying to understand the integration architecture for a bare metal loadbalancer