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: