<p>I am running elasticsearch cluster on Kubernetes cluster. I have a need to increase the heap size. Right now the heap size is 4gb and memory allocated to the pod is 8gb. When setting up elastic search cluster on VMs/BMs I have always followed the principle that heap size should not be more than 50% of physical RAM. Please follow link <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html</a> 
Now my question is, will this principle work in the same manner when running elastic search on K8 or how to decide the heap size when running ES on K8?</p>

Nitesh Ratnaparkhe
<p>The heap size should be half the size of RAM allocated to pods. </p>

<p><a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-managing-compute-resources.html" rel="nofollow noreferrer"><em>From elasticsearch guide:</em></a></p>

<blockquote>
  <p>The heap size should be half the size of RAM allocated to the Pod. To
  minimize disruption caused by Pod evictions due to resource
  contention, you should run Elasticsearch pods at the "Guaranteed" QoS
  level by setting both requests and limits to the same value.</p>
</blockquote>
