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.
Related
Is there any other way except port-forwarding, I can access the apps running inside my K8s cluster via http://localhost:port from my host operating system.
For example
I am running minikube setup to practise the K8s and I deployed three pods along with their services, I choose three different service type, Cluster IP, nodePort and LoadBalancer.
For Cluster IP, I can use port-forward option to access my app via localhost:port, but the problem is, I have to leave that command running and if for some reason, it is distributed, connection will be dropped, so is there any alternate solution here ?
For nodePort, I can only access this via minikube node IP not with the localhost, therefore, if I have to access this remotely, I wont have a route to this node IP address
For LoadBalancer, not a valid option as I am running minikube in my local system not in cloud.
Please let me know if there is any other solution to this problem, the reason why I am asking this when I deploy same application via docker compose, I can access all these services via localhost:port and I can even call them via VM_IP:port from other systems.
Thanks,
-Rafi
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
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.
If i have installed K8S using minikube, where will the master node components be installed. (Ex: the api server, replication controller, etcd etc)
Is it in the host? or the VM?
I understand the worker node is the VM configured by minikube
Everything is installed in the Virtual Machine. Based on the localkube project, it is creating an All-in-one single-node cluster.
More information here: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/cluster-lifecycle/local-cluster-ux.md