预先拉取镜像以为新的Kubernetes集群自动扩展节点。

huangapple go评论71阅读模式
英文:

Pre pull image for new Kubernetes cluster autoscale-up Nodes

问题

我的Pods/容器运行在一个大约4GiB大小的Docker镜像上。每当新的虚拟机节点在资源不足时启动时,从容器注册表中拉取镜像大约需要2分钟。

也就是说,每当有新请求进来,Kubernetes服务自动扩展一个新节点时,需要2分钟以上。用户必须等待2分钟才能提交请求。不太理想。我目前正在使用Azure AKS来部署我的应用,并使用他们的集群自动缩放功能。

我正在使用典型的部署设置,包括1个固定的主控制Pod和3个固定的工作Pod。这3个工作Pod对应于3种不同类型的请求。每次有请求进来,工作Pod将生成一个K8 Job来处理该请求。

最重要的问题是,我如何预拉取这些镜像,以便在Kubernetes集群中启动新节点时,用户不必等待太长时间才能准备好新的Job?

英文:

My pods/containers run on a docker image which is about 4GiB in size. Pulling the image from the container registry takes about 2 mins whenever a new VM node is spun up when resources are insufficient.

That is to say, whenever a new request comes in and the Kubernetes service auto scale up a new node, it takes 2 mins+. User has to wait 2 mins to put through a request. Not ideal. I am currently using the Azure AKS to deploy my application and using their cluster autoscaler feature.

I am using a typical deployment set up with 1 fix master pod, and 3 fix worker pods. These 3 worker pods correspond to 3 different types of requests. Each time a request comes in, the worker pod will generate a K8 Job to process the request.

BIG Question is, how can I pre pull the images so that when a new node is spun up in the Kubernetes cluster, users don't have to wait so long for the new Job to be ready?

答案1

得分: 3

如果您正在使用Azure容器注册表(ACR)来存储和拉取您的镜像,您可以启用传送功能,这将显着减少您的镜像拉取时间。请参考链接获取更多信息。

英文:

If you are using Azure Container Registry (ACR) for storing and pulling your images you can enable teleportation that will significantly reduce your image pull time. Refer link for more information

huangapple
  • 本文由 发表于 2020年1月4日 12:43:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/59587956.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定