Cannot access external IP of Load Balancer in a Kubernetes cluster

Viewed 703

I created a load balancer service and the describe command returns the following:

Name:                     minio-service
Namespace:                minio
Labels:                   app=minio
Annotations:              <none>
Selector:                 app=minio
Type:                     LoadBalancer
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.43.150.49
IPs:                      10.43.151.50
LoadBalancer Ingress:     192.168.31.12, 192.168.32.13, 192.168.33.14
Port:                     <unset>  9012/TCP
TargetPort:               9011/TCP
NodePort:                 <unset>  30777/TCP
Endpoints:                10.42.10.110:9011,10.42.10.111:9011
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>

If I try curl http://192.168.31.12:9012 it returns:

curl: (7) Failed to connect to 192.168.31.12 port 9012: Connection timed out

Furthermore, I observed something strange.

kubectl get nodes -o wide

NAME           STATUS   ROLES                  AGE     VERSION        INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                         KERNEL-VERSION       CONTAINER-RUNTIME
antonis-dell   Ready    control-plane,master   4h42m   v1.21.2+k3s1   192.168.31.12    <none>        Ubuntu 18.04.1 LTS               4.15.0-147-generic   containerd://1.4.4-k3s2
knodea         Ready    <none>                 4h9m    v1.21.2+k3s1   192.168.32.13   <none>        Raspbian GNU/Linux 10 (buster)   5.10.17-v7l+         containerd://1.4.4-k3s2
knodeb         Ready    <none>                 4h2m    v1.21.2+k3s1   192.168.33.14   <none>        Raspbian GNU/Linux 10 (buster)   5.4.51-v7l+          containerd://1.4.4-k3s2

which means that LoadBalancer Ingress ips are the same with internal ips of nodes in the cluster.

Does anyone know why I have three LoadBalancer Ingress ips which are the same as the internal node ips and how to fix this?

0 Answers
Related