How pods without any resource quota are handled by kubernetes?

4/4/2019

How much cpu and memory resources are allocated to a pod if we do not apply any resource quota in kubernetes? How they are changed when we scale up/down our deployment? I tried reading kubernetes docs but was unable to find above answers. I am using amazon-eks.

-- Mayank Senani
amazon-eks
aws-eks
kubernetes

1 Answer

4/4/2019

If you do not specify a memory limit for a Container, one of the following situations applies:

  • The Container has no upper bound on the amount of memory it uses. The Container could use all of the memory available on the Node where it is running.

  • The Container is running in a namespace that has a default memory limit, and the Container is automatically assigned the default limit. Cluster administrators can use a LimitRange to specify a default value for the memory limit.

https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/

If you do not specify a CPU limit for a Container, then one of these situations applies:

  • The Container has no upper bound on the CPU resources it can use. The Container could use all of the CPU resources available on the Node where it is running.

  • The Container is running in a namespace that has a default CPU limit, and the Container is automatically assigned the default limit. Cluster administrators can use a LimitRange to specify a default value for the CPU limit.

https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/

-- almalki
Source: StackOverflow