<p>We have a data processing service that tries to utilize as much CPU and memory as possible. In VMs this service uses max CPU and memory available and keeps on running. But when we run this service to Kubernetes it gets evicted as soon as it hits resource limits. Is there a way to let the service hit max resource usage and not get evicted?</p>

shailesh
<blockquote>
<p>The kubelet is the primary &quot;node agent&quot; that runs on each node.  [<a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">1</a>]</p>
<p>When you specify a <a href="https://kubernetes.io/docs/concepts/workloads/pods/" rel="nofollow noreferrer">Pod</a>, you can optionally specify how much of each resource a <a href="https://kubernetes.io/docs/concepts/containers/" rel="nofollow noreferrer">container</a> needs. [<a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="nofollow noreferrer">2</a>]</p>
</blockquote>
<p>@mmking has the point. Indeed kubelet requires some resources per node and that's the reason of seeing eviction.</p>
<p>And again like @mmking mentioned - unfortunately there's no way around that.</p>
<blockquote>
<p>I'd recommend setting resource limits to whatever the math comes down to (total resource minus kubelet requirements).</p>
</blockquote>
<p>I agree with the sentence above. <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits" rel="nofollow noreferrer">Here</a> you can find documentation.</p>
<p>References:</p>
<p>[1] <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer"><em>Kubelet</em></a></p>
<p>[2] <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="nofollow noreferrer"><em>Manage resources containers</em></a></p>
