gpt4 book ai didi

docker - 使用 start-first 进行滚动更新时,docker swarm 会采取哪些步骤?

转载 作者:行者123 更新时间:2023-12-02 18:21:06 26 4
gpt4 key购买 nike

当 docker swarm 在多个正在运行的容器实例上使用 stop-first 进行滚动更新时,它会按顺序对行中的每个容器执行以下步骤:

  1. 从其内部负载均衡器中删除容器

  2. 向容器发送 SIGTERM 信号。

  3. 关于stop-grace-period,发送一个SIGKILL信号。

  4. 启动一个新的容器

  5. 将新容器添加到其内部负载均衡器

但是当我想使用start-first 进行滚动更新时,采取的步骤顺序是什么?

旧容器和新容器是否可以同时通过负载均衡器使用(直到旧容器停止并从 lb 中删除)?

或者新容器会先启动而不添加到负载均衡器直到旧容器停止并从负载均衡器中删除?

后者对于绑定(bind)到特定服务实例(容器)的进程是必需的。

最佳答案

But which order of steps are taken when I want to do a rolling update with start-first?

基本上是相反的。新容器启动,添加到LB,然后旧容器从LB中移除并发送关闭信号。

Will the old- and new- container be available through the loadbalancer at the same time (until the old one has stopped and removed from the lb)?

是的。

请注意,除非您(至少)在服务中启用健康检查,否则其中大部分都不会是无缝的(或接近零停机时间)。我稍微谈谈这个in this YouTube video .

关于docker - 使用 start-first 进行滚动更新时,docker swarm 会采取哪些步骤?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52679331/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com