3

According to readme in heapster repo, the project is now deprecated. The current recommended solution is to use the metrics server which acorrding to documentation can be accessed by using kubectl top. I have deployed it on my bare-metal CentOs machine. Unfortunately it seems it does not work out of the box:

bash-4.2$ kubectl get pod metrics-server-bb9ffc6b8-7c25g -n=kube-system
NAME                             READY     STATUS    RESTARTS   AGE
metrics-server-bb9ffc6b8-7c25g   1/1       Running   0          9h
bash-4.2$ kubectl top pods
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
bash-4.2$

It seems like it still tries to access heapster and it is not compatible with metrics server. Do I need to perform additional setup to make it work?

I'm using kubectl and kubelet v1.9.3.

EDIT: After I've deployed heapster, I can see usage charts on dashboard. So it seems like eve if it is officially deprecated, it works as expected.

Djent
  • 89
  • 4
  • 15
  • if you used kubeadm to install your cluster, maybe the problem is cadvisor is disabled https://github.com/coreos/prometheus-operator/issues/633 – c4f4t0r May 22 '18 at 10:08
  • heapster doesn't need the cadvisor to work? – Djent May 22 '18 at 11:39
  • The Heapster pod discovers all nodes in the cluster and queries usage information from each node's Kubelet the on-machine Kubernetes agent. The Kubelet itself fetches the data from cAdvisor, I think cAdvisor is integrated in kubernetes in the newers version, but disabled by default – c4f4t0r May 22 '18 at 11:48

1 Answers1

3

kubectl top uses Metrics-Server instead of Heapster as a source for metrics starting from v1.10, but in v1.9.3, Heapster is still required.

Here is the merged pull request about it with Milestone = v1.10.

Anton Kostenko
  • 652
  • 6
  • 5