<p><a href="https://i.stack.imgur.com/fGisn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fGisn.png" alt="enter image description here"></a></p>

<p>This is my Kubernetes cluster node monitoring. K8s cluster is running on GKE and using the stack driver monitoring and logging.</p>

<p>Cluster size is 4vCPU and 15GB memory. In the CPU graph why there is spike above the limit of CPU ? as my cluster CPU is 4vCPU but the limit spike is there. </p>

<p>There is no cluster auto scaler, Node auto scaler, Vertical auto scaler nothing is running. </p>

<p>Same question For memory?</p>

<p><a href="https://i.stack.imgur.com/wgUxH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wgUxH.png" alt="enter image description here"></a></p>

<p>Total size is 15 GB but capacity is 15.77 GB and allocatable 13 GB mean 2 GB is for the Kubernetes system.</p>

<p>For perfect monitoring, I have installed the Default Kubernetes dashboard</p>

<p><a href="https://i.stack.imgur.com/njsre.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/njsre.png" alt="enter image description here"></a></p>

<p>Which shows usage is around 10.2GB so I have still 2-3 GB of RAM?
As allocatable is 13 GB system taken 2 GB? Am I right?</p>

<p>I have also installed Grafana also </p>

<p><a href="https://i.stack.imgur.com/uR81w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uR81w.png" alt="enter image description here"></a></p>

<p>This shows 450 MB Free ram I have imported this dashboard.</p>

<p>But if it's using around 10GB of RAM then out of 13 GB I should have 2-3 GB remaining.</p>

<p><strong>Update :</strong></p>

<pre><code>Kubectl describe node &lt;node&gt;


Resource           Requests         Limits
  --------           --------         ------
  cpu                3073m (78%)      5990m (152%)
  memory             7414160Ki (58%)  12386704Ki (97%)
</code></pre>

<p>If you have a look at the first graph of stackdriver as usage increase of RAM limit increase tp 15GB but while allocation or usable memory is 13GB only. How ?</p>

Harsh Manvar
<p>In your case you have 2 questions, one related to CPU usage and other to Memory Usage:</p>

<p>You put a limited information and the CPU and memory usage depends on different aspects, such as pods, number of nodes, etc.</p>

<p>You put you aren’t using autoscaler for nodes.</p>

<p>This page for <a href="https://cloud.google.com/monitoring/api/metrics_gcp?hl=en_US&amp;_ga=2.33532794.-598886069.1562156452#gcp-container" rel="nofollow noreferrer">Stackdriver Monitoring</a>, you can see the part of containers and for the CPU graph uses “container/cpu/usage_time” where explain “Cumulative CPU usage on all cores in seconds. This number divided by the elapsed time represents usage as a number of cores, regardless of any core limit that might be set. Sampled every 60 seconds”.</p>

<p>In the same page and talking about memory you can read about this graph use “container/memory/bytes_used” where tells “Memory usage in bytes, broken down by type: evictable and non-evictable. Sampled every 60 seconds.
memory_type: Either <code>evictable</code> or <code>non-evictable</code>. Evictable memory is memory that can be easily reclaimed by the kernel, while non-evictable memory cannot.”, in this case is using non-evictable.</p>

<p>In your question about the size which the system is allocatable in the case of the memory, it depends on the size you put for cluster works.</p>

<p>for example I proceed to create a cluster with 1 vCPU and 4Gb of memory and the memory allocatable is 2.77Gb.</p>
