Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to access local kubernetes minikube dashboard remotely

Kubernetes newbie (or rather basic networking) question: Installed single node minikube (0.23 release) on a ubuntu box running in my lan (on IP address 192.168.0.20) with virtualbox.

minikube start command completes successfully as well

minikube start Starting local Kubernetes v1.8.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. 

minikube dashboard also comes up successfully. (running on 192.168.99.100:30000)

what i want to do is access minikube dashboard from my macbook (running on 192.168.0.11) in the same LAN.

Also I want to access the same minikube dashboard from the internet.

For LAN Access: Now from what i understand i am using virtualbox (the default vm option), i can change the networking type (to NAT with port forwarding) using vboxnet command

VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22" 

as listed here

In my case it will be something like this

VBoxManage modifyvm "VM name" --natpf1 "guesthttp,http,,30000,,8080" 

Am i thinking along the right lines here?

Also for remotely accessing the same minikube dashboard address, i can setup a no-ip.com like service. They asked to install their utility on linux box and also setup port forwarding in the router settings which will port forward from host port to guest port. Is that about right? Am i missing something here?

like image 407
Robin Bajaj Avatar asked Nov 08 '17 07:11

Robin Bajaj


People also ask

How do I access Kubernetes dashboard remotely?

Ans: In a terminal window, enter kubectl proxy to make the Kubernetes Dashboard available. Open a browser and go to http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes–dashboard:/proxy/#!/login to display the Kubernetes Dashboard that was deployed when the cluster was created.

How do I access minikube remotely?

You can't access minikube remotely because it's only accessible locally. For this reason, you need to deploy an Nginx reverse proxy next to minikube that will allow receiving requests from remote clients then forward them to kube-apiserver.


1 Answers

I was able to get running with something as simple as:

kubectl proxy --address='0.0.0.0' --disable-filter=true 
like image 197
Jeff Prouty Avatar answered Oct 17 '22 10:10

Jeff Prouty