access minikube cluster on the same network

Viewed 2279

I've set up a minikube cluster for development purpose inside a VM.
I've deployed few services and an ingress controller (the minikube one) to be able to access it without using NodePorts.
Inside my VM, I can access my services as usual with curl http://hello-world.info or another one. Everything works fine.

But when I'm outside of my VM, I can't access it even if I'm on the same network. I tried from my hosting server, from my laptop and outside with a VPN.
The cluster IP is well listed in my addresses inside the VM (ip a), but not accessible outside of it (e.g: ping xxx).
How can I access my cluster services on another machine inside the same network ?

My VM's IP is set to static (ubuntu-server 20.XX.XX) with netplan at 192.168.1.128 and my cluster IP is 192.168.49.2. My DHCP server is allowed to distribute IPs only between 192.168.1.101-254.

Thanks :).

1 Answers

Personally I haven't found a way to expose minikube instance with --driver=docker on LAN.

As a workaround to expose your minikube instance on LAN you can either --driver:

  • --driver=virtualbox
  • --driver=none

Being specific to the exposing your Kubernetes cluster to LAN, I would also consider checking out other Kubernetes solutions like (you could run them on bare-metal or run them in a vbox vm with bridged networking:


--driver=virtualbox:

Citing part of my own answer some time ago:

As I previously mentioned: When you create your minikube instance with Virtualbox you will create below network interfaces:

  • NAT- interface which will allow your VM to access the Internet. This connection cannot be used to expose your services
  • Host-only-network-adapter - interface created by your host which allows to communicate within the interface. It means that your host and other vm's with this particular adapter could connect with each other. It's designed for internal usage.

You can read more about Virtualbox networking here:

I've managed to find a workaround to allow connections outside your laptop/pc to your minikube instance. You will need to change network interface in settings of your minikube instance from Host-only-network-adapter to Bridged Adapter (2nd adapter). This will work as another device was connected to your physical network. Please make sure that this bridged adapter is used with Ethernet NIC. Minikube should change IP address to match the one used in your physical one.

You will also need to change your .kube/config as it will have the old/wrong IP address!

After that you should be able to connect to your Ingress resource by IP accessible in your physical network.

-- Stackoverflow.com: Answers:: Expose Kubernetes cluster to Internet


--driver=none

You can also run minikube with --driver=none but there are some caveats to this method which you can read more about by following this docs (tl;dr you are running your minikube directly on your host):


Additional resources:

Related