MetalLB external load balancer on docker-desktop community edition on Windows 10 single-node Kubernetes Infrastructure

5/22/2020

I am trying to set up a metalLB external load balancer with the intention to access an nginx pod from outside the cluster using a publicly browseable IP address. I have folled all the steps provided in here. I have managed to get the External-IP for service/nginx type:LoadBalancer, but when I try to browse the IP address, I get nothing and it says "This site can’t be reached".

running <code>kubectl get nodes -o wide</code> shows

enter image description here

I wonder whether is it even allowed on the docker-desktop win10 environment to access the k8s cluster resources from outside with a public IP address?

-- Muhammad Arslan Akhtar
docker-desktop
kubernetes
metallb
nginx
nginx-ingress

1 Answer

5/22/2020

Kuberntes provided by Docker Desktop is running in a VM and all network traffic is being NATed to a virtual machine. Even if you had everything properly configured on your network for using layer 2 and DHCP, your work or home router would not even know how to reach Docker which makes any services only available on the localhost.

To make it work you coud try using minikube with VirtualBox driver and set network interface to bridge, so that the minikube VM is visible to your router as a standalone instance and therefore arp requests can reach minikube.

-- HelloWorld
Source: StackOverflow