问题描述
Kubernetes的CPU限制是否为硬"限制?
Are Kubernetes CPU limits "hard" limits?
说我有一个节点,该节点具有1个CPU,并已调度两个Pod,每个Pod的运行/就绪/活动状态为500m. Pod A占用1个CPU一段时间-这是正常的/允许的.最终,pod B需要一些CPU. Kubernetes(或Linux)是否可以确保Pod B可以获取它要求的.5 CPU?
Say I have a node with 1 CPU with two pods scheduled and running/ready/active, each with requests.limits.cpu
of 500m. Pod A uses up 1 CPU for a while--this is normal/allowed. Eventually, pod B wants some CPU. Will Kubernetes (or Linux) make sure that pod B can get the .5 CPU it asks for?
我仍在寻找一个明确的答案,但是听起来这可能是Linux/Docker中的硬性限制. @danielmartins
写了 .slack.com"rel =" nofollow> k8s闲置频道:
I'm still looking for a definitive answer, but it sounds like these may be hard limits in Linux/Docker. @danielmartins
wrote this in the k8s slack channel:
推荐答案
对于kubernetes v1.2 +,CPU资源限制是通过硬上限来强制执行的,而请求是使用共享来强制执行的.
For kubernetes v1.2+, CPU resource limits are enforced using hardcapping, and requests are enforced using shares.
The change was noted in the release note and there is an issue open to update the documentation.
这篇关于Kubernetes CPU限制如何执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!