Kubernetes dashboard not showing up outside

0 votes

I was following a blog posted by Edureka to install kubernetes on a 2 node cluster (one master and 2 nodes). Everything went fine, and when I use curl to access dashboard I am getting html code response. But I have a requirement of accessing this dashboard using the private IP of this VM internally within the corporate network. I can easily SSH to this VM if I am connected to a VPN, so should be able to access this dashboard too.

Since I am using Ubuntu 16.04 server, I don't have a browser to access the dashboard internally and so, would require the kube dashboard through private IP. Here are some results for the commands I fired after googling:

admin@master:~$ kubectl -n kube-system get service kubernetes-dashboard

NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE

kubernetes-dashboard   ClusterIP   10.101.84.169   <none>        443/TCP   23h

admin@master:~$ kubectl describe svc kubernetes-dashboard -n kube-system

Name:              kubernetes-dashboard

Namespace:         kube-system

Labels:            k8s-app=kubernetes-dashboard

Annotations:       <none>

Selector:          k8s-app=kubernetes-dashboard

Type:              ClusterIP

IP:                10.101.84.169

Port:              <unset>  443/TCP

TargetPort:        8443/TCP

Endpoints:         10.0.10.7:8443

Session Affinity:  None

Events:            <none>

Can someone please help me at the earliest.?

Mar 12 in Kubernetes by Vysakh SN
380 views

4 answers to this question.

+1 vote
answered Mar 16 by anonymous
I did try that, but still ext IP is showing none.
+1 vote

You can use kubectl forward or proxy for temporary show dashboard on time that you want. In my opinion. Kubernetes's dashboard shouldn't show all the time.

answered Mar 18 by Prav
0 votes
Hey @Vysakh, you've used the service type as ClusterIP. When you use clusterIP, you services include the dashboard will only be visible inside your cluster. Use service type as NodePort or LoadBalancer to get an external IP.
answered Mar 18 by Kalgi
• 40,480 points
+1 vote
In dashboard yaml, change cluster ip to nodeip, or you can forward it via proxy
answered Mar 19 by anonymous
[root@com-kube-master ~]# kubectl describe svc kubernetes-dashboard -n kube-system
Error from server (NotFound): services "kubernetes-dashboard" not found
[root@com-kube-master ~]# kubectl get pods --all-namespaces
NAMESPACE              NAME                                                         READY   STATUS    RESTARTS   AGE
kube-system            coredns-5c98db65d4-2cz5w                                     1/1     Running   0          18h
kube-system            coredns-5c98db65d4-v644r                                     1/1     Running   0          18h
kube-system            etcd-com-kube-master.nonprod.hclpnp.com                      1/1     Running   0          18h
kube-system            kube-apiserver-com-kube-master.nonprod.hclpnp.com            1/1     Running   0          18h
kube-system            kube-controller-manager-com-kube-master.nonprod.hclpnp.com   1/1     Running   13         18h
kube-system            kube-proxy-h5mnd                                             1/1     Running   0          164m
kube-system            kube-proxy-j4tqm                                             1/1     Running   0          18h
kube-system            kube-proxy-klfpg                                             1/1     Running   0          3h32m
kube-system            kube-proxy-nvdhq                                             1/1     Running   0          168m
kube-system            kube-scheduler-com-kube-master.nonprod.hclpnp.com            1/1     Running   13         18h
kube-system            weave-net-f5xrq                                              2/2     Running   0          18h
kube-system            weave-net-jbxsg                                              2/2     Running   0          164m
kube-system            weave-net-lnql5                                              2/2     Running   0          168m
kube-system            weave-net-pgh79                                              2/2     Running   0          3h32m
kubernetes-dashboard   dashboard-metrics-scraper-fb986f88d-p84ql                    1/1     Running   0          163m
kubernetes-dashboard   kubernetes-dashboard-6bb65fcc49-hgwbf                        1/1     Running   0          163m
[root@com-kube-master ~]#

You have mention the service name which is kubernetes-dashboard-6bb65fcc49-hgwbf in this case. So your command will be:

 kubectl describe svc kubernetes-dashboard-6bb65fcc49-hgwbf -n kube-system

Related Questions In Kubernetes

0 votes
3 answers

Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) while setting up kubernetes

Execute these three commands: sudo rm /var/lib/apt/lists/lock sudo rm ...READ MORE

answered Nov 27, 2018 in Kubernetes by Maverick
• 10,040 points
157 views
0 votes
1 answer

Not able to access the kubernetes dashboard

Have you executed this proxy command? kubectl proxy Try ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 40,480 points
108 views
0 votes
0 answers

Kubernetes dashboard Url is not accessing in my browser?

im facing the issue from yesterday.  i ...READ MORE

Jun 19 in Kubernetes by anonymous

closed Jun 20 by Kalgi 82 views
0 votes
1 answer
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 40,480 points
62 views
+3 votes
1 answer