<p>I'm trying to find all the ways that I can get the CPU and memory usage info in kubernetes.
And based on that decide as to which one is the most efficient way of doing it.
Collecting this stats during the orchestrator survey phase, using kube/container primitives.
Any pointers will be appreciated.
Thank you.</p>

Dev
<p>Kubernetes uses the <strong>metrics server</strong> for resource monitoring. The metrics server will show you the CPU and Memory but it won't store it anywhere.</p>
<p>So You won't be able to store &amp; get the historical data in the metrics server.</p>
<p>Installation : <a href="https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html</a></p>
<p>Repo : <a href="https://github.com/kubernetes-sigs/metrics-server" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/metrics-server</a></p>
<p><strong>Prometheus &amp; Grafana</strong></p>
<p>You can also use Prometheus &amp; Grafana for monitoring. Prometheus will scrape the metrics and you can show it inside the Grafana dashboard.</p>
<p><a href="https://prometheus.io/docs/visualization/grafana/" rel="nofollow noreferrer">https://prometheus.io/docs/visualization/grafana/</a></p>
<p>There is other also various tools available like :</p>
<ul>
<li>New relics</li>
<li>Datadog</li>
<li>Cloud watch AWS</li>
<li>GCP stack driver &amp; monitoring</li>
</ul>
