How do I determine resource requests and limits for my Kubernetes deployments?

7/27/2019

Let us say I am deploying a Redis server to a Kubernetes cluster.

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

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

-- Naved Khan
kubernetes

1 Answer

8/2/2019

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.

This article and the film included in it present some best practices and might be very helpful when deciding how to configure requests and limits in your particular kubernetes cluster.

Before taking decision about configuring limits you should observe your cluster behavior for some time. Tools for Monitoring Resources are excellent source of such information.

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.

-- mario
Source: StackOverflow