kubectl top node error metrics not available yet . Using metrics-server as Heapster Depricated
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When kubectl top node says metrics are not available yet, the problem is almost never kubectl itself. The command depends on the cluster’s resource-metrics pipeline, and in modern Kubernetes that means metrics-server, not Heapster, which has long been deprecated.
What kubectl top Actually Uses
kubectl top does not read node statistics directly from the operating system. It queries the Kubernetes Metrics API, which is typically served by metrics-server. metrics-server scrapes resource usage from each kubelet and exposes that data through the aggregated API so tools like kubectl top and autoscalers can read it.
That design explains the error. If metrics-server is missing, failing, blocked from kubelets, or still starting up, kubectl top has no data to display.
Install or Reinstall metrics-server
If the cluster does not already have it, install the current release manifest.
Then wait a short time and check whether the deployment is healthy.
A fresh install often needs a minute before metrics start appearing.
Verify the Aggregated API
A working metrics-server also has to register the Metrics API with the apiserver. That is why the APIService object is a useful diagnostic step.
If the APIService is not available, kubectl top will fail even when the pod is running. Common reasons include TLS issues, aggregation-layer problems, or the service not being reachable from the apiserver.
Check the metrics-server Logs
The next place to look is the container log. Kubelet connection errors are extremely common.
Typical problems include:
- kubelet certificate validation failures
- nodes reporting addresses that
metrics-servercannot reach - missing aggregation-layer support in the control plane
- network policies blocking access from
metrics-serverto kubelets
In lab clusters and some local environments, you may need additional arguments such as a preferred kubelet address type. For example:
If kubelet certificates are self-signed or otherwise incompatible, some environments also use --kubelet-insecure-tls. That can unblock a dev cluster, but it should be treated as a compatibility workaround, not the first production choice.
Heapster vs metrics-server
Older blog posts still mention Heapster. That is stale guidance. Heapster was removed from the standard metrics pipeline years ago. If the question is "should I use Heapster or metrics-server for kubectl top?" the answer is metrics-server.
It is also important to understand what metrics-server is for. It is intended for resource metrics used by autoscaling and quick operational checks. It is not a full monitoring stack like Prometheus.
A Practical Triage Sequence
When this error appears, the fastest path is usually:
- confirm
metrics-serverexists inkube-system - check pod readiness and logs
- inspect the
v1beta1.metrics.k8s.ioAPIService - verify kubelet reachability and certificate behavior
- retry
kubectl top nodeafter the pipeline stabilizes
That sequence isolates most failures quickly without guessing.
Common Pitfalls
- Assuming Heapster is still the correct fix leads to outdated installation advice.
- Treating
metrics-serveras a general monitoring solution causes design confusion. It is primarily for Kubernetes resource metrics. - Ignoring the APIService object can hide aggregation-layer failures.
- Using
--kubelet-insecure-tlseverywhere without understanding the certificate issue weakens the setup unnecessarily. - Expecting metrics immediately after install can produce false alarms because the server may still be warming up.
Summary
- '
kubectl top nodedepends onmetrics-server, not Heapster.' - The error usually means the Metrics API is missing, unhealthy, or still gathering data.
- Check the deployment, pod logs, and
v1beta1.metrics.k8s.ioAPIService first. - Kubelet address and certificate issues are common root causes.
- Use
metrics-serverfor resource metrics and autoscaling support, not as a full observability stack.

