<p>I'm using <code>kubernetes 1.11.0</code> and running heapster. When I run </p>

<pre><code>kubectl top pod
</code></pre>

<p>It will show error</p>

<pre><code>Error from server (ServiceUnavailable): the server is currently unable to handle the request (get services http:heapster:)
</code></pre>

<p>while I have installed heapster already</p>

<pre><code>kubectl create -f deploy/kube-config/influxdb/
kubectl create -f deploy/kube-config/rbac/heapster-rbac.yaml
</code></pre>

<p>Any suggest?</p>

<p><strong>Update</strong>:</p>

<p>the command <code>kubectl top pod</code> works now but the endpoint doesn't work</p>

<pre><code>kubectl get --raw "/apis/metrics.k8s.io/v1beta1/pods"
#Error from server (ServiceUnavailable): the server is currently unable to handle the request
</code></pre>

Meysam Mahmoodi
<p>Can you check and ensure that your kubectl binary is the latest? Something like </p>

<p><code>
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
</code>
This generally happens if kubectl is older. Old kubectl versions were looking for <code>heapster</code> service to be present but new ones should not have this problem. 
Hope this helps.</p>

<p>In addition to above, you might want to consider moving to metrics server since heapster is on its way to being deprecated. </p>

<p><a href="https://github.com/kubernetes/heapster/blob/master/docs/deprecation.md" rel="nofollow noreferrer">https://github.com/kubernetes/heapster/blob/master/docs/deprecation.md</a></p>
