<p>I have a single node Kubernetes cluster which shows 10Gi, 3 CPU as available(of total 16 Gi, 4CPU) for running the pods post the cluster startup. I am trying two different scenarios then:</p>

<pre><code>Scenario-1. 
   Running 3 pods individually with configs(Request,Limit) as: 
   Pod-A: (1 Gi,3.3Gi) and (1 cpu,1 cpu)
   Pod-B: (1 Gi,3.3Gi) and (1 cpu,1 cpu)
   Pod-C: (1 Gi,3.3Gi) and (1 cpu,1 cpu)
</code></pre>

<p>In this scenario, apps get perfectly up in there corresponding pods and works fine as expected.</p>

<pre><code>Scenario-2. 
   Running 3 pods individually with configs(Request,Limit) as: 
   Pod-A: (1 Gi,10 Gi) and (1 cpu,3 cpu)
   Pod-B: (1 Gi,10 Gi) and (1 cpu,3 cpu)
   Pod-C: (1 Gi,10 Gi) and (1 cpu,3 cpu)
</code></pre>

<p>In the second scenario, apps get up in there corresponding pods and but fails randomly after some load is put over any of these pods i.e. sometime Pod-A gets down, at times Pod-2 or Pod-3. At any point of time I am not able to run all the three pods together.</p>

<p>The only event I can see in the failed pod is as below</p>

<p>"<strong><code>The warning which is available in node logs says "Warning  CheckLimitsForResolvConf  1m (x32 over 15m)    kubelet, xxx.net  Resolv.conf file '/etc/resolv.conf' contains search line consisting of more than 3 domains</code>!.</strong>".</p>

<p>Having only this information in logs, I am not able to figure out the actual reason for random failure of Pods.</p>

<p>Can anyone help me understand if there is anything wrong with the configs or is there something else I am missing?</p>

<p>Thanks</p>

Jaraws
<p>When you create a Pod, the Kubernetes scheduler selects a node for the Pod to run on. 
Each node has a maximum capacity for each of the resource types: the amount of CPU and memory it can provide for Pods. The scheduler ensures that, for each resource type, the sum of the resource requests of the scheduled Containers is less than the capacity of the node. </p>

<blockquote>
  <p><strong>Note</strong> Although actual memory or CPU resource usage on nodes is very low, the scheduler still refuses to place a Pod on a node if the <strong>capacity check fails</strong>. This protects against a resource shortage on a node when resource usage later increases, for example, during a daily peak in request rate.</p>
</blockquote>

<p><strong>So after scheduling If a Container exceeds its memory request, it is likely that its Pod will be evicted whenever the node runs out of memory</strong></p>

<p>Refer <a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#hard-eviction-thresholds" rel="nofollow noreferrer">Default Hard Eviction Threshold values</a>.</p>

<p>The kubelet has the following default hard eviction threshold:</p>

<pre><code>memory.available&lt;100Mi
nodefs.available&lt;10%
nodefs.inodesFree&lt;5%
imagefs.available&lt;15%
</code></pre>

<p>You should track your <a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#node-conditions" rel="nofollow noreferrer">Node Conditions</a> when load is running.</p>

<p>kubelet maps one or more eviction signals to a corresponding node condition.</p>

<p>If a hard eviction threshold has been met, or a soft eviction threshold has been met independent of its associated grace period, the kubelet reports a condition that reflects the node is under pressure i.e <code>MemoryPressure</code> or <code>DiskPressure</code></p>
