<p>I have installed Heapster in my Kubernetes cluster.I can give resource usage from command line, for example <code>kubectl top pods</code>, and Kubernetes web panel.</p>

<p>I'm trying to get resource usage via web API from Heapster. Actually I'd like to get resource usage (e.g: ram and cpu) a node, pod or namespace from Web API. </p>

<p>There is a web api <code>http://localhost:8001/swagger-2.0.0.json</code> in Kubernetes but there isn't any API for resource usage or Heapster data.</p>

<p>Is there any way to get resource usage via web API in Kubernetes ?</p>

<p>thanks</p>

<p><strong>Question has been answered in the above comment section.</strong></p>

<p>In order to access the Node as well as Pod Metrics, It's better to use <a href="https://github.com/kubernetes-incubator/metrics-server" rel="nofollow noreferrer">Metrics_server</a> which is the successor of heapster.</p>

<p>The metrics server collects CPU and memory usage for nodes and pods by pooling data from Kubelet. </p>

<p>View nodes and pods metrics:</p>

<p><code>kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes"</code></p>

<p><code>kubectl get --raw "/apis/metrics.k8s.io/v1beta1/pods"</code></p>
