kubectl top node|pod

Posted November 9, 2018 12k views

It looks like heapster is not enabled on the cluster? Is this a planned feature?

kubectl top node
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

I’ve used the same on other cloud providers (AKS, IKS) and it seems to be enabled…

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
  • Install metrics server chart
  • Update the command metrics server deployment and add the following two options to the pod command :

    - --kubelet-insecure-tls
    - --kubelet-preferred-address-types=InternalIP

Command will be look like this :

    - /metrics-server
    - --kubelet-insecure-tls
    - --kubelet-preferred-address-types=InternalIP

Wait two or three minutes, then the “top” command should work.

  • Because heapster is deprecated, use metrics-server if you can.
    Unfortuenatly kubernetes-dashboard requires heapster for any graphs.

    I’ve got it working with a helm installment using the https kubelet port 10250 instead of the readonly http port 10255 - which is deprecated and not available on DO too

    helm upgrade --install --wait k8s-heapster stable/heapster --set=command='{/heapster,--source=kubernetes:https://kubernetes.default?kubeletHttps=true&kubeletPort=10250&insecure=true}' --namespace kube-system

The following will help with understanding what is happening on the nodes:

$ cat bin/ 
set -euo pipefail

echo -e "Iterating...\n"

nodes=$(kubectl get node --no-headers -o

for node in $nodes; do
  echo "Node: $node"
  kubectl describe node "$node" | sed '1,/Non-terminated Pods/d'


You have to deploy heapster in your cluster to collect metrics ;)
by default its not activated on digitalocean k8s-cluster.

There is a helm chart for heapster:

You can easily install metrics server to your cluster via marketplace: