title: GKE - Metrics-Server - HTTP probe failed with statuscode: 500
body: <p>It works for sometime and then it crashes <code>CrashLoopBackOff</code>. When it works occasionally I get the <code>Unauthorized</code> error. After 5 to 10 minutes, it crashes.</p>
  <pre><code>Error from server (InternalError): an error on the server (&quot;Internal Server Error: \&quot;/apis/metrics.k8s.io/v1beta1/nodes\&quot;: Unauthorized&quot;) has prevented the request from succeeding (get nodes.metrics.k8s.io)
  </code></pre>
  <p>I'm using the latest version of metric-server.</p>
  <pre><code>Events:
    Type     Reason     Age                   From               Message
    ----     ------     ----                  ----               -------
    Normal   Scheduled  27m                   default-scheduler  Successfully assigned kube-system/metrics-server-59ff97d56-xjbh4 to gke-test-test-node-pool-05539c92-26z1
    Normal   Created    20m (x3 over 27m)     kubelet            Created container metrics-server
    Normal   Started    20m (x3 over 27m)     kubelet            Started container metrics-server
    Warning  Unhealthy  20m (x7 over 21m)     kubelet            Liveness probe failed: HTTP probe failed with statuscode: 500
    Warning  Unhealthy  20m (x8 over 21m)     kubelet            Readiness probe failed: HTTP probe failed with statuscode: 500
    Normal   Killing    12m (x8 over 20m)     kubelet            Container metrics-server failed liveness probe, will be restarted
    Normal   Pulled     7m19s (x9 over 27m)   kubelet            Container image &quot;k8s.gcr.io/metrics-server/metrics-server:v0.4.1&quot; already present on machine
    Warning  BackOff    2m15s (x71 over 18m)  kubelet            Back-off restarting failed container
  </code></pre>
  <p>I tried changing settings like suggested by others <a href="https://stackoverflow.com/a/64771066/8445363">answers</a> but none of them work. Any other suggestions?</p>
  <pre><code>135a136,137
  &gt;         - --kubelet-insecure-tls
  &gt;         - --kubelet-preferred-address-types=InternalIP
  151a154
  &gt;           initialDelaySeconds: 300
  </code></pre>