minikube dashabord unable to access it from outsude/internet

4/16/2020

Here is the output of minikube dashbaord

ubuntu@ip-172-31-5-166:~$ minikube dashboard
* Enabling dashboard ...
* Verifying dashboard health ...
* Launching proxy ...
* Verifying proxy health ...
* Opening http://127.0.0.1:45493/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...
  - http://127.0.0.1:45493/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/

I have enabled port 45493 at Security Group Level and also on Linux VM. However,, when I'm trying to access the Kube dashboard, I don't have luck

wget http://13.211.44.210:45493/
--2020-04-16 05:50:52--  http://13.211.44.210:45493/
Connecting to 13.211.44.210:45493... failed: Connection refused.

However, when I do the below, it works and produces index.html file with status code 200

wget http://127.0.0.1:45493/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
--2020-04-16 05:52:55--  http://127.0.0.1:45493/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Connecting to 127.0.0.1:45493... connected.
HTTP request sent, awaiting response... 200 OK

Steps to reproduce at high level is as below:

  1. EC2 Ubuntu of size t2.large
  2. Install minikube, minikube start --driver=docker
  3. Perform deployment as like kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

  4. kubectl get pods -n kubernetes-dashboard NAME READY STATUS RESTARTS AGE dashboard-metrics-scraper-84bfdf55ff-xx8pl 1/1 Running 0 26m kubernetes-dashboard-bc446cc64-7nl68 1/1 Running 0 26m

5.kubectl get svc -n kubernetes-dashboard

TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
dashboard-metrics-scraper   ClusterIP   10.102.85.110   <none>        8000/TCP   40m
kubernetes-dashboard        ClusterIP   10.99.75.241    <none>        80/TCP     40m

My question is why I'm unable to access the internet?

-- learner
kubernetes
minikube

1 Answer

4/16/2020

This is by design, minikube is a development tool for local environments. You can deploy an ingress or loadbalancer service to expose the dashboard, if you really know what you are doing.

-- Thomas
Source: StackOverflow