Assume I have a pod with 3 containers: X
, Y
, and Z
.
K8S can set a cpu limit for each container in a pod. However, if I set 1000M
CPU limit to each container, then any container cannot use more than 1000M
CPU even if the other two are ilde, which is not what I want.
I want to set a CPU quota of 3000M
to the pod, rather than to each container. For example, if X
& Y
are idle, Z
can use 3000M
CPU; if X
is using 1500M
CPU, Y
is using 1000M
CPU, then Z
can only use 500M
CPU.
So, my question is:
How to share a CPU quota among multiple containers?