<p>Let us say I am deploying a Redis server to a Kubernetes cluster. </p>

<p>How do I determine the resource requests and limits that I should set for my Pod? </p>

<p>I tried leaving resources unconfigured, but find that my pods are frequently evicted. I have Horizontal and Vertical Scaling enabled on my node pools.</p>

Navid Khan
<p>This is a very individual question and it is impossible to give a simple answer. Everything depends on your specific needs and your application usage pattern.</p>

<p><a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-resource-requests-and-limits" rel="nofollow noreferrer">This article</a> and the <a href="https://www.youtube.com/watch?v=xjpHggHKm78" rel="nofollow noreferrer">film</a> included in it present some best practices and might be very helpful when deciding how to configure requests and limits in your particular <strong>kubernetes cluster</strong>.</p>

<p>Before taking decision about configuring limits you should observe your cluster behavior for some time. <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/" rel="nofollow noreferrer">Tools for Monitoring Resources</a> are excellent source of such information.</p>

<blockquote>
  <p>To scale an application and provide a reliable service, you need to
  understand how the application behaves when it is deployed. You can
  examine application performance in a Kubernetes cluster by examining
  the containers, pods, services, and the characteristics of the overall
  cluster. Kubernetes provides detailed information about an
  application’s resource usage at each of these levels. This information
  allows you to evaluate your application’s performance and where
  bottlenecks can be removed to improve overall performance.</p>
</blockquote>
