Unable to get the metrics from heapster pod in Kubernetes Cluster

10/23/2018

I am trying to get the metrics in Kubernetes dashboard. For that I'm running the influxdb and heapster pod in my kube-system namespace. I checked the status of pods using the command kubectl get pods -n kube-system. Here is the link which I was followed But heapster shows the logs as

E1023 13:41:07.915723       1 reflector.go:190] k8s.io/heapster/metrics/util/util.go:30: Failed to list *v1.Node: Get https://kubernetes.default/api/v1/nodes?resourceVersion=0: dial tcp: i/o timeout

Could anybody suggest where might be I will do the changes in my configurations?

-- gayathri
heapster
influxdb
kubernetes

1 Answer

10/24/2018

Looks like the heapster cannot talk to you kube-apiserver through the kubernetes service on your default namespace. A few of things, you can try:

  1. Check that the service is defined in the default namespace:

    $ kubectl get svc kubernetes
    NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
    kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   92d
    
  2. Check that all your kube-proxy pods are running ok:

    $ kubectl -n kube-system -l=k8s-app=kube-proxy get pods
    NAME               READY   STATUS    RESTARTS   AGE
    kube-proxy-xxxxx   1/1     Running   0          4d18h
    ...
    
  3. Check that all your overlay pods are running. For example for calico

    $ kubectl -n kube-system -l=k8s-app=calico-node get pods
    NAME                READY   STATUS    RESTARTS   AGE
    calico-node-88fgd   2/2     Running   3          4d21h
    ...
    
-- Rico
Source: StackOverflow