<p>I want to know the share of resource - cpu, memory- per kubernetes's pod. 
And I want to know what the standard of share is</p>

gyuhyeon lee
<p>This is hard to do using kubectl only (or I don't know how). What we usually do is to use the kubelet metric-server to export all metric to prometheus. We then use Grafana to calculate those values. The following metrics should allow you to calculate your values:</p>

<p>CPU cores:</p>

<ul>
<li>kube_node_status_allocatable_cpu_cores - available cores</li>
<li>kube_pod_container_resource_requests_cpu_cores - requested cores per container</li>
<li>container_cpu_usage_seconds_total - used cores per container</li>
</ul>

<p>Memory:</p>

<ul>
<li>kube_node_status_allocatable_memory_bytes - available memory</li>
<li>kube_pod_container_resource_requests_memory_bytes - requested memory by container</li>
<li>container_memory_usage_bytes - used memory by container</li>
</ul>

<p>You can filter those by label (i.e. by pod name or namespace) and calculate all kinds of things based on them.</p>
