I try to run an exposed service on my Macbook(M1). However, I failed to browse the service locally. What could be the root cause?
Please see the attached images.
Is the shortcut command for fetching the minikube IP and a service’s NodePort not working?
minikube service --url <service-name>
There are some limitations with minikube running with docker driver on MacOS. Please see this GitHub issue.
There are two options at least (more, but these are simple to do):
use the minikube tunnel
Tunnel is used to expose the service from inside of the VM where minikube is running to the host machine's network. Please refer to access applications in minikube.
This is how minikube_IP:NodePort transforms to localhost:different_port.
start minikube with VirtualBox driver to get a proper IP (if you
really need to access your service on NodePort), below the command
how to start it with VirtualBox driver (this should be installed on
your machine):
minikube start --driver=VirtualBox
Related
We deployed Hono on a minikube cluster running on a virtual machine (CentOS 8). The load balancer is running and we can access and interact with Hono from within this virtual machine. However, we don't know how to access Hono from the outside, i.e. from our local network.
Is there some additional configuration required, like e.g. some sort of network bridge? We aren't very experienced with network setup and configuration.
Minikube is designed for local development in VM and it not intended to be accessed from the outside.
The easiest thing you could do to access it from the outside is to run minikube without a VM by starting it with:
sudo minikube start --vm-driver=None
And then you can expose the application with Service of NodePort type.
i'm trying to install Eclipse Che 7.0 on a local network server, using the KVM2/Minikube method.
The request is to be able to use Che from another machine on the same network.
My local network is something like 192.168.80.*, the Ingress service maps the Che address on 192.168.39.???.
What's the correct way to map the Che address on the local network?
Thanks!
So you are trying to access minikube instance running in virtual environment from other host in the same network.
The easiest way to do this is to run minikube without vm-driver like following:
sudo minikube start --vm-driver=none
in this way minikube will start directly on your host machine and not inside of a vm so you won't need to care about forwarding connection to your kubernetes instance.
From now on you can expose your service as nodeport service and access it directly using ip address of your host machine. No proxy/forwarding needed.
Let me know if it was useful.
I have a server running on ubuntu where I need to expose my app using kubernetes tools. I created a cluster using minikube with virtualbox machine and with the command kubectl expose deployment I was able tu expose my app... but only in my local network. It's mean that when I run minikube ip I receive a local ip. My question is how can I access my minikube machine from outside ?
I think the answer will be "port-forwarding".But how can I do that ?
You can use SSH port forwarding to access your services from host machine in the following way:
ssh -R 30000:127.0.0.1:8001 $USER#192.168.0.20
In which 8001 is port on which your service is exposed, 192.168.0.20 is minikube IP.
Now you'll be able to access your application from your laptop pointing the browser to http://192.168.0.20:30000
If you mean to access your machine from the internet, then the answer is yes "port-forwarding" and use the external ip address [https://www.whatismyip.com/]. The configurations go into your router settings. Check your router manual.
I have a similar issue as below with exposing kubernetes services via type: LoadBalancer on my local minikube cluster.
LoadBalancer support
I saw that there is a workaround for this and it can be fixed via running the command minikube tunnel.
Minikube Tunnel Design Doc
However the command 'minikube tunnel' doesn't work for me and it throws an error of "Unknown command". Does anyone know if i am missing anything?
Thanks for the help!
The tunnel feature is quite new and may not be in your minikube version so try upgrading to latest minikube
minikube on a vm, vm is installed on windows10.
how to access minikube's dashboard from windows10?
I heard and doing some investigate about nodeport but still asking.
I guess the simplest way to do this is kubectl proxy.
You can find an instruction in official Kubernetes documentation