<p>How to re-apply GKE metric server that comes installed by default? Also will it return <code>TOP</code> command stats?</p>
<p>I tried to install and then deleted the <a href="https://github.com/kubernetes-sigs/metrics-server/releases" rel="nofollow noreferrer">GITHUB version</a> of metric server and now it might have deleted some roles related to default GKE metric server. I even tried reinstalling the GitHub version but I still get error..</p>
<pre><code>kubectl top pods --all-namespaces
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
kubectl top pods --all-namespaces
Error from server (InternalError): an error on the server (&quot;Internal Server Error: \&quot;/apis/metrics.k8s.io/v1beta1/pods\&quot;: Unauthorized&quot;) has prevented the request from succeeding (get pods.metrics.k8s.io)
</code></pre>
<p>GKE has the following pods running..</p>
<pre><code>metrics-server-v0.3.6-7c5cb99b6f-npgzv
gke-metrics-agent-wkg5b
</code></pre>

user630702
<p>How to re-apply GKE metric server that comes installed by default?</p>
<p>First get name of metric server pod:</p>
<pre><code>kubectl get pods --all-namespaces
</code></pre>
<p>Delete pod:</p>
<pre><code>kubectl delete pod metrics-server-v0.3.6-547dc87f5f-sctcp -n kube-system
</code></pre>
<p>Since metric server is managed by Google, a new one will be reinstalled with a different pod name after deletion.</p>
<p>Also will it return TOP command stats?
It should, for example,</p>
<pre><code>kubectl top pod metrics-server-v0.3.6-547dc87f5f-sctcp --containers -n kube-system
</code></pre>
