Not able to access the kubernetes dashboard deployed using Kubespray

4/24/2020

I am trying to deploy Kubernetes dashboard using Kubespray. Looks like the dashboard pod is running, but i am unable to view it and test it.

NAME    STATUS   ROLES    AGE   VERSION
node2   Ready    master   10d   v1.16.2
node3   Ready    master   10d   v1.16.2
node4   Ready    master   10d   v1.16.2
node5   Ready    <none>   10d   v1.16.2
node6   Ready    <none>   10d   v1.16.2
$ kubectl get po --all-namespaces
NAMESPACE     NAME                                      READY   STATUS    RESTARTS   AGE
kube-system   calico-kube-controllers-bf68b657b-svq9j   1/1     Running   8          10d
kube-system   calico-node-5mp68                         1/1     Running   7          10d
kube-system   calico-node-kp58q                         1/1     Running   7          10d
kube-system   calico-node-ppgwn                         1/1     Running   7          10d
kube-system   calico-node-qrb4g                         1/1     Running   7          10d
kube-system   calico-node-v7zdg                         1/1     Running   7          10d
kube-system   coredns-85578f88b8-49gjv                  1/1     Running   6          10d
kube-system   coredns-85578f88b8-n94cz                  1/1     Running   6          10d
kube-system   dns-autoscaler-7d4cfd5f55-9cfkc           1/1     Running   6          10d
kube-system   kube-apiserver-node2                      1/1     Running   6          10d
kube-system   kube-apiserver-node3                      1/1     Running   6          10d
kube-system   kube-apiserver-node4                      1/1     Running   6          10d
kube-system   kube-controller-manager-node2             1/1     Running   7          10d
kube-system   kube-controller-manager-node3             1/1     Running   6          10d
kube-system   kube-controller-manager-node4             1/1     Running   7          10d
kube-system   kube-proxy-2sp79                          1/1     Running   6          10d
kube-system   kube-proxy-4lkd8                          1/1     Running   6          10d
kube-system   kube-proxy-fbffc                          1/1     Running   6          10d
kube-system   kube-proxy-j6dbh                          1/1     Running   6          10d
kube-system   kube-proxy-m74tl                          1/1     Running   6          10d
kube-system   kube-scheduler-node2                      1/1     Running   6          10d
kube-system   kube-scheduler-node3                      1/1     Running   6          10d
kube-system   kube-scheduler-node4                      1/1     Running   6          10d
kube-system   kubernetes-dashboard-556b9ff8f8-2gmql     1/1     Running   11         10d
kube-system   nginx-proxy-node5                         1/1     Running   7          10d
kube-system   nginx-proxy-node6                         1/1     Running   6          10d
kube-system   nodelocaldns-85pl4                        1/1     Running   8          10d
kube-system   nodelocaldns-d8p9s                        1/1     Running   6          10d
kube-system   nodelocaldns-jbrq9                        1/1     Running   6          10d
kube-system   nodelocaldns-pzm74                        1/1     Running   6          10d
kube-system   nodelocaldns-qvzhv                        0/1     Pending   0          10d
kubectl get services --all-namespaces
NAMESPACE     NAME                   TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes             ClusterIP   10.233.0.1     <none>        443/TCP                  10d
kube-system   coredns                ClusterIP   10.233.0.3     <none>        53/UDP,53/TCP,9153/TCP   10d
kube-system   kubernetes-dashboard   NodePort    10.233.35.30   <none>        443:30271/TCP            10d

I have executed the command from the worker node - kubectl proxy

This gives a message 'Starting to serve on 127.0.0.1:8001'

Then I did ssh into the same instance and executed the command -
'curl http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/'

But received response - 'Error trying to reach service: 'dial tcp 10.233.70.7:8443'

Why the port changed to 8443 ? From where the ip comes - 10.233.70.7 ?

Can someone please guide me?

Regards. Soumitra

-- Soumitra
kubernetes
kubernetes-dashboard
kubespray

0 Answers