LoadBalancer service EXTERNAL-IP stuck in pending state

422 views
Skip to first unread message

RhythmicDevil

unread,
Nov 2, 2021, 10:48:29 AM11/2/21
to metallb-users
I am trying to setup K3s, MetalLB, and Traefik following this tutorial from Just Me And Opensource. I installed K3s without servicelb, or traefik.

curl -sfL https://get.k3s.io | sh -s - server --disable traefik --disable servicelb

I followed the tutorial and got as far as deploying the Nginx LoadBalancer to test whether MetalLB will pass out an IP from the range in the configmap. However the LoadBalancer service EXTERNAL-IP stays in a pending state.

I am not sure how to troubleshoot this. I have inspected the components and they all seem happy, I dont see errors or warnings. I have verified that the IP range I configured is available in the network.

I do see that the LoadBalancer service has no events, which I think means that its not connected to anything.

k describe service/nginx
Name:                     nginx
Namespace:                default
Labels:                   app=nginx
Annotations:              <none>
Selector:                 app=nginx
Type:                     LoadBalancer
IP:                       10.43.119.71
Port:                     <unset>  80/TCP
TargetPort:               80/TCP
NodePort:                 <unset>  30762/TCP
Endpoints:                10.42.0.6:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>

What steps can I take to troubleshoot this issue?

RhythmicDevil

unread,
Nov 2, 2021, 10:49:20 AM11/2/21
to metallb-users
This is the current state of my system.

$k get all --all-namespaces
NAMESPACE        NAME                                          READY   STATUS    RESTARTS   AGE
kube-system      pod/metrics-server-86cbb8457f-zhswd           1/1     Running   0          18h
kube-system      pod/local-path-provisioner-5ff76fc89d-mh6mv   1/1     Running   0          18h
kube-system      pod/coredns-7448499f4d-n95rh                  1/1     Running   0          18h
metallb-system   pod/controller-7dcc8764f4-8xrbb               1/1     Running   0          3h1m
metallb-system   pod/speaker-dc6kv                             1/1     Running   0          3h1m
default          pod/nginx-6799fc88d8-x4m6v                    1/1     Running   0          178m

NAMESPACE     NAME                     TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
default       service/kubernetes       ClusterIP      10.43.0.1      <none>        443/TCP                  18h
kube-system   service/kube-dns         ClusterIP      10.43.0.10     <none>        53/UDP,53/TCP,9153/TCP   18h
kube-system   service/metrics-server   ClusterIP      10.43.33.248   <none>        443/TCP                  18h
default       service/nginx            LoadBalancer   10.43.119.71   <pending>     80:30762/TCP             177m

NAMESPACE        NAME                     DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
metallb-system   daemonset.apps/speaker   1         1         1       1            1           kubernetes.io/os=linux   3h1m

NAMESPACE        NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
kube-system      deployment.apps/metrics-server           1/1     1            1           18h
kube-system      deployment.apps/local-path-provisioner   1/1     1            1           18h
kube-system      deployment.apps/coredns                  1/1     1            1           18h
metallb-system   deployment.apps/controller               1/1     1            1           3h1m
default          deployment.apps/nginx                    1/1     1            1           178m

NAMESPACE        NAME                                                DESIRED   CURRENT   READY   AGE
kube-system      replicaset.apps/metrics-server-86cbb8457f           1         1         1       18h
kube-system      replicaset.apps/local-path-provisioner-5ff76fc89d   1         1         1       18h
kube-system      replicaset.apps/coredns-7448499f4d                  1         1         1       18h
metallb-system   replicaset.apps/controller-7dcc8764f4               1         1         1       3h1m
default          replicaset.apps/nginx-6799fc88d8                    1         1         1       178m

Etienne Champetier

unread,
Nov 2, 2021, 9:30:09 PM11/2/21
to RhythmicDevil, metallb-users
Hi,

Share the metallb configmap and the full logs of the controller
> --
> You received this message because you are subscribed to the Google Groups "metallb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to metallb-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/metallb-users/678c9599-58ba-4e71-963a-be71ab4404b0n%40googlegroups.com.

IlluminateS

unread,
Nov 8, 2022, 10:09:30 AM11/8/22
to metallb-users
What is the nginx service yaml? can you please paste it here.. as well for the metalLB where you have the IP range defined.
Reply all
Reply to author
Forward
0 new messages