简体   繁体   English

Kubernetes Pod创作速度

[英]Kubernetes Pod Creation Speed

We would like to spin up pods quickly on our cluster, to handle 'one-off' tasks (the idea being that each task has a new pod every time it runs). 我们想在我们的集群上快速启动pod,以处理“一次性”任务(这个想法是每个任务在每次运行时都有一个新的pod)。

Currently, it takes about 10-15 seconds from a Pod creation API call -> completion. 目前,Pod创建API调用大约需要10-15秒 - >完成。 This is running on 3x m3 xlarge on AWS, with images that have already been cached (I presume, as I am using the same image twice on a single Node). 这是在AWS上运行3x m3 xlarge,图像已经被缓存(我认为,因为我在单个节点上使用相同的图像两次)。 We are running with restartPolicy = Never, as they are one off tasks. 我们使用restartPolicy = Never运行,因为它们是一个关闭的任务。

I've tried fiddling with the imagePullPolicy (= Never) and resource options with no avail. 我试过摆弄imagePullPolicy(= Never)和资源选项但没有用。 It appears that the 10 second delay happens in the 'Running' phase, after Kubernetes has handed it off to a Pod. 在Kubernetes将其交给Pod之后,似乎10秒延迟发生在“运行”阶段。 I can confirm the operation itself is very quick: running locally on Docker only takes about 0.5s total, including the operation. 我可以确认操作本身非常快:在Docker上本地运行只需要大约0.5秒,包括操作。

Is there any way to speed this up? 有什么方法可以加快速度吗?

Our target is 5s latency from creation -> Running (assuming image is pre-pulled). 我们的目标是从创建开始延迟5秒 - >运行(假设图像是预先拉出的)。 The issue tracking this was https://github.com/GoogleCloudPlatform/kubernetes/issues/3954 . 跟踪此问题的问题是https://github.com/GoogleCloudPlatform/kubernetes/issues/3954

This issue was closed a couple weeks ago, so please update to version 20.2 and give it another try. 这个问题在几周前就已经关闭了,所以请更新到版本20.2并再试一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM