title: How can I use metrics-server instead of heapster to see CPU usage in HPA
body: <p>How can I set to use metrics-server to get CPU usage for HPA?</p>
  
  <pre><code># kubectl top nodes
  </code></pre>
  
  <blockquote>
    <p>error: metrics not available yet</p>
  </blockquote>
  
  <pre><code># kubectl get pods -n kube-system
  </code></pre>
  
  <blockquote>
    <p>NAME READY STATUS RESTARTS AGE </p>
    
    <p>heapster-709db6bd48-f2gba 2/2 Running 0 6h</p>
    
    <p>metrics-server-70647b8f8b-99pja 1/1 Running 0 5h </p>
    
    <p>.....</p>
  </blockquote>
  
  <pre><code># kubectl get hpa
  </code></pre>
  
  <blockquote>
    <p>NAME                REFERENCE                      TARGETS         MINPODS   MAXPODS   REPLICAS   AGE</p>
    
    <p>devops-deployment   Deployment/devops-deployment   &lt;unknown>/50%   4         10        4          1h</p>
  </blockquote>