I'm trying to access minikube dashboard from host OS (Windows 10).
Minikube is running on my virtual machine Ubuntu 20.04 server.
The host is Windows 10 and I use VirtualBox to run my VM.
These are the commands I ran on Ubuntu:
tomas@ubuntu20:~$ minikube start
* minikube v1.22.0 on Ubuntu 20.04 (vbox/amd64)
* Using the docker driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Updating the running docker "minikube" container ...
* Preparing Kubernetes v1.21.2 on Docker 20.10.7 ...
* Verifying Kubernetes components...
- Using image gcr.io/k8s-minikube/storage-provisioner:v5
- Using image kubernetesui/dashboard:v2.1.0
- Using image kubernetesui/metrics-scraper:v1.0.4
* Enabled addons: storage-provisioner, default-storageclass, dashboard
* kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
tomas@ubuntu20:~$ kubectl get po -A
Command 'kubectl' not found, but can be installed with:
sudo snap install kubectl
tomas@ubuntu20:~$ minikube kubectl -- get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-558bd4d5db-9p9ck 1/1 Running 2 72m
kube-system etcd-minikube 1/1 Running 2 72m
kube-system kube-apiserver-minikube 1/1 Running 2 72m
kube-system kube-controller-manager-minikube 1/1 Running 2 72m
kube-system kube-proxy-xw766 1/1 Running 2 72m
kube-system kube-scheduler-minikube 1/1 Running 2 72m
kube-system storage-provisioner 1/1 Running 4 72m
kubernetes-dashboard dashboard-metrics-scraper-7976b667d4-r9k7t 1/1 Running 2 54m
kubernetes-dashboard kubernetes-dashboard-6fcdf4f6d-c7kwf 1/1 Running 2 54m
And then I open another terminal window and I run:
tomas@ubuntu20:~$ minikube dashboard
* Verifying dashboard health ...
* Launching proxy ...
* Verifying proxy health ...
* Opening http://127.0.0.1:36337/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...
http://127.0.0.1:36337/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Now on my Windows 10 host machine I go to web browser type in:
http://127.0.0.1:36337/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
But I get error:
This site can’t be reached 127.0.0.1 refused to connect.
How can I access minikube dashboard from my host OS web browser?