<p>I'm running kubernetes using an ec2 machine on aws.
Node is in Ubuntu.</p>
<p>my metrics-server version.</p>
<pre><code>wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml
</code></pre>
<p>components.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-server
  namespace: kube-system
  labels:
     k8s-app: metrics-server
  spec:
       serviceAccountName: metrics-server
  volumes:
  # mount in tmp so we can safely use from-scratch images and/or read-only containers
  - name: tmp-dir
    emptyDir: {}
  containers:
  - name: metrics-server
    image: k8s.gcr.io/metrics-server/metrics-server:v0.3.7
    imagePullPolicy: IfNotPresent
    args:
      - --cert-dir=/tmp
      - --secure-port=4443
      - --kubelet-preferred-address-type=InternalIP,ExternalIP,Hostname
      - --kubelet-insecure-tls
</code></pre>
<p>Even after adding args, the error appears.
error :
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)</p>
<p>or</p>
<p>error: metrics not available yet</p>
<p>No matter how long I wait, that error appears.</p>
<p>my kops version  : Version 1.18.0 (git-698bf974d8)</p>
<p>i use networking calico.</p>
<p>please help...</p>
<p>++
I try to wget <a href="https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml" rel="noreferrer">https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml</a></p>
<p>view logs..</p>
<p>kubectl logs -n kube-system deploy/metrics-server</p>
<p>&quot;Failed to scrape node&quot; err=&quot;GET &quot;https://172.20.51.226:10250/stats/summary?only_cpu_and_memory=true&quot;: bad status code &quot;401 Unauthorized&quot;&quot; node=&quot;ip-172-20-51-226.ap-northeast-2.compute.internal&quot;</p>
<p>&quot;Failed probe&quot; probe=&quot;metric-storage-ready&quot; err=&quot;not metrics to serve&quot;</p>

<p>Download the components.yaml file manually:</p>
<pre><code>wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
</code></pre>
<p>Then edit the <strong>args</strong> section under <strong>Deployment</strong>:</p>
<pre><code>spec:
  containers:
  - args:
    - --cert-dir=/tmp
    - --secure-port=443
    - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
    - --kubelet-use-node-status-port
    - --metric-resolution=15s
</code></pre>
<p>add there two more lines:</p>
<pre><code>    - --kubelet-insecure-tls=true
    - --kubelet-preferred-address-types=InternalIP
</code></pre>
<p>kubelet Of 10250 The port uses https agreement , The connection needs to be verified by tls certificate. Adding ,--kubelet-insecure-tls tells it do not verify client certificate.</p>
<p>After this modification just apply the manifest:</p>
<pre><code>kubectl apply -f components.yaml
</code></pre>
<p>wait a minute and you will see metrics server pod is up</p>
