2
votes

From here i realized, if container is not given CPU limits, then it takes up default CPU limits from Namespace level: https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/

My question is, what if we have not set default CPU limits (LimitRange) in Namespace level. In this case what CPU limits does Container is assigned ?

Thanks.

2

2 Answers

5
votes

If a container doesn't specify its own CPU request and limit, it is assigned the default CPU request and limit from the LimitRange, if such LimitRange is configured for the namespace.

If LimitRange isn't configured for the namespace and container doesn't specify its own CPU request and limit, the pod runs in the BestEffort QoS (Quality of Service) class. In this case, the CPU is given from a shared pool for the node, up to the available CPU in the shared pool and if there is CPU available in it. In practice, there may not be any CPU available and the pod/container could "starve" for CPU.

0
votes

The container[s] will use the CPU resources of the node/host systems. You have to vertically scale the resources of your nodes if needed.