<p>&quot;Failed to scrape node&quot; `</p>
<pre><code>err=&quot;GET \&quot;https://10.128.0.17:10250/stats/summary? 
only_cpu_and_memory=true\&quot;: bad status code \&quot;403 Forbidden\&quot;&quot; 
node=&quot;gke-zipydev-cluster-zipy-pool-b4bfa53a-t575&quot;
I1215 10:33:03.405180       1 server.go:188] &quot;Failed probe&quot; 
probe=&quot;metric-storage-ready&quot; err=&quot;not metrics to serve&quot;
E1215 10:33:10.513042       1 scraper.go:139] &quot;Failed to scrape 
node&quot; err=&quot;GET \&quot;https://10.128.0.16:10250/stats/summary? 
only_cpu_and_memory=true\&quot;: bad status code \&quot;403 Forbidden\&quot;&quot; 
node=&quot;gke-zipydev-cluster-zipy-pool-b4bfa53a-sg4t&quot;
</code></pre>
<p>please help if anyone faced same issue.</p>

<p>The privileges for the metrics server are not correctly added as the “403“ error is because access to the requested resource is forbidden.</p>
<p>The Metrics Server requires the <strong>“CAP_NET_BIND_SERVICE”</strong> capability in order to bind to a privileged ports as non-root as this applies even if you use the <strong>--secure-port</strong> flag to change the port that Metrics Server binds to to a non-privileged port. Refer <a href="https://github.com/kubernetes-sigs/metrics-server#security-context" rel="nofollow noreferrer">Security context</a> for information.</p>
<p>As described in the <a href="https://github.com/kubernetes/kubernetes/pull/105938/files" rel="nofollow noreferrer">Github link</a>, Granting metrics-server necessary permissions to access(query/read) <em><strong>nodes/stat</strong></em> API resource is the workaround to solve this issue. You can grant metrics-server necessary permissions by using the below configuration file.</p>
<pre><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: system:metrics-server
rules:
  - apiGroups:
      - &quot;&quot;
    resources:
      - nodes/stats
      - nodes
    verbs:
      - get
      - list
</code></pre>
<p><strong>NOTE:</strong> Check your metrics-server has a recent version if you installed it manually. In order to update your metrics-server deployment, you can refer to the <a href="https://github.com/kubernetes-sigs/metrics-server/releases?page=1" rel="nofollow noreferrer">Github link</a> and select the version which suits you.</p>
<p>Refer <a href="https://stackoverflow.com/questions/61125754/">stackpost</a> for more information about 403 forbidden errors.</p>
