Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Defining Default Limits and Requests with Limitrange

Sumit Rawal answered on June 19, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Using LimitRange#
  • default-limit-range.yaml
  • Defining default requests and limits#

  • Defining Default Limits and Requests with Limitrange

    0

    Differences between memory and CPU limits

    Using LimitRange

    Differences between memory and CPU limits

    There is a difference in what happens to a container when it reaches its limit for CPU and memory usage. CPU is a compressible resource, which means Kubernetes can just stop giving that specific container CPU time if a container tries to use more CPU than it should. The container will not be killed. It will just not have to keep running with the amount of CPU time it has available.

    With memory, it’s different. If a container tries to allocate more memory than it can, Kubernetes will kill the process. Then, depending on the restartPolicy that is defined for this pod, it can be restarted.

    Using LimitRange

    So we saw that defining resource requests are useful to help Kubernetes schedule our pod in a node that has enough resources and defining a limit will guarantee that a rogue container won’t affect other applications sharing the same worker node. It is a good idea to always set these properties.

    Kubernetes allows us to define a LimitRange with default values that will be used for every container that we run in a namespace. 

    Popularity 1/10 Helpfulness 1/10 Language typescript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jun 19 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.