Minikube: access dashboard from host - 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

Related

Failed to run exposed service on MacBook Pro M1

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

How to access a machine in my network from microk8s deployments

I have some pods running in microk8s and they need to access a machine outside the cluster and inside my local network. The problem is they can't access it even using the IP address.
Example:
In the host itself I can use "curl " and get the expected result, but inside a pod I can't do that.
I just did a very simple test using minikube and the IP is accessible by default, so I think the issue is something related to microk8s and I prefer to use it if possible.
Addons enabled:
dashboard
dns
ha-cluster
istio
metrics-server
registry
storage
This question is similar to this one How to access hosts in my network from microk8s deployment pods but in my case I can't even access using the IP, so it's not a problem of naming resolution like it was there.
Is there anything else I need to do to make this work?

How to access minikube machine from outside?

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.

minikube tunnel throws an exception

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

Kubernetes - Unable to hit the server

We deployed a containerized app by pulling a public docker image from docker hub and were able to get a pod running at a server running at 172.30.105.44. Hitting this IP from a rest client or curl/pinging the IP gives no response. Can someone please guide us where we are going wrong?
Firstly, find out the IP of your node by executing the command
kubectl get nodes
Get the information related to the pod running by executing the command kubectl describe services <pod-name>
Make a note of the field NodePort from here.
To access your service that is already running, hit the endpoint - nodeIP:NodePort.
You can now access your service successfully!
I am not sure where you have deployed (AWS, GKE, Bare) but you should make sure you have the following:
https://kubernetes.io/docs/user-guide/ingress/
https://kubernetes.io/docs/user-guide/services/
Ingress will work out of the box on GKE, but with an AWS installation, you may need to make sure you have nginx-ingress pods running.