title: How to get Pod CPU and Memory Usage from metrics-server?
body: <p>I currently have metric server installed and running in my K8s cluster.</p>
  
  <p>Utilizing the the kubernetes python lib, I am able to make this request to get pod metrics:</p>
  
  <pre><code>from kubernetes import client
  
  api_client = client.ApiClient()
  ret_metrics = api_client.call_api(
              '/apis/metrics.k8s.io/v1beta1/namespaces/' + 'default' + '/pods', 'GET',
              auth_settings=['BearerToken'], response_type='json', _preload_content=False)
  response = ret_metrics[0].data.decode('utf-8')
  print('RESP', json.loads(response))
  </code></pre>
  
  <p>In the response, for each pod all containers will be listed with their cpu and memory usage:</p>
  
  <pre><code>'containers': [{'name': 'elasticsearch', 'usage': {'cpu': '14122272n', 'memory': '826100Ki'}}]}
  </code></pre>
  
  <p>Now my question is how do i get these metrics for the pod itself and not its containers? I'd rather not have to sum up the metrics from each container if possible. Is there any way to do this with metrics-server? </p>