0

I am new to Kubernetes and is trying to deploy one master and 2 nodes. I completed the installation in master and the pods are running.

kubectl get pods --all-namespaces
NAMESPACE     NAME                             READY   STATUS    RESTARTS   AGE
kube-system   calico-node-g2fxl                1/1     Running   0          5m56s
kube-system   coredns-86c58d9df4-2jpfq         1/1     Running   0          7m59s
kube-system   coredns-86c58d9df4-bxvct         1/1     Running   0          7m59s
kube-system   etcd-master                      1/1     Running   0          7m19s
kube-system   kube-apiserver-master            1/1     Running   0          7m16s
kube-system   kube-controller-manager-master   1/1     Running   0          7m7s
kube-system   kube-proxy-jg2cp                 1/1     Running   0          7m59s 
kube-system   kube-scheduler-master            1/1     Running   0          7m8s

I can curl localhost:8001 successfully, but unable to access kube dashboard from my laptop using private IP of this server (I am connected to VPN and SSH to this master VM using this private IP). checking the logs shows me:

Metric client health check failed: the server is currently unable to handle the request (get services heapster). Retrying in 30 seconds.

Googling and found these (https://brookbach.com/2018/10/29/Heapster-on-Kubernetes-1.11.3.html and https://elatov.github.io/2018/06/installing-heapster-for-kubernetes/). But still unsuccessful in getting the dashboard from outside. Can someone please guide me correctly.

serverstackqns
  • 722
  • 2
  • 16
  • 39

3 Answers3

0

When it happened to me, I just added hostNetwork : True to yaml file and reapplied it.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
tom
  • 1
0

You should expose your Dashboard UI (service/kubernetes-dashboard) on NodePort type Service, instead of ClusterIP, if you want to access it via private IP of cluster node, as explained here.

Confirmed to be working fine in following configuration:

enter image description here

Kubernetes: v1.13.4
Heapster image: k8s.gcr.io/heapster-amd64:v1.5.3
Dashboard: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1

Nepomucen
  • 306
  • 1
  • 4
0

Please check this solution:

 kubectl -n kube-system edit service kubernetes-dashboard

change the:

  type: ClusterIP

to

  type: NodePort

Next check the ports mapping

kubectl -n kube-system get service kubernetes-dashboard

NAME                   TYPE       CLUSTER-IP       EXTERNAL-IP   PORT(S)         AGE
kubernetes-dashboard   NodePort   10.103.252.123   <none>        443:30287/TCP   6m51s

In this case connect using https://_MASTER_IP_:30287

This is works for me ..

porto
  • 101