[英]kubernetes, have 2 replicas of the pod
I have a front end app on a POD called.我有一个名为 POD 的前端应用程序。 Right now, when I deploy and the POD rebuilds, the site content on that PODF will be some minutes down, it will be down all the time that takes to the POD to rebuild, so I need to create a replica of the POD for:
现在,当我部署并重建 POD 时,该 PODF 上的站点内容将下降几分钟,它会一直下降到 POD 重建所需的时间,因此我需要为 POD 创建一个副本:
the one which is active and will be available for users while the new one:一个是活动的,将可供用户使用,而新的一个:
a new one that is creating and will replace the active one.一个正在创建并将替换活动的新的。
Currently I have this values in my config:目前我的配置中有这个值:
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
What should I change for have those 2 replicas?有这两个副本我应该改变什么?
maxUnavailable
should be 0? maxUnavailable
应该是 0?
What else?还有什么? I couldn't find much info about how to have 2 replicas.
我找不到太多关于如何拥有 2 个副本的信息。
In the rolling update, you have the two variables:在滚动更新中,您有两个变量:
So if you want to keep (the number of available replicas >= the replicas count) at any given moment, you can set maxUnavailable
to 0.因此,如果您想在任何给定时刻保持(可用副本数 >= 副本数),您可以将
maxUnavailable
设置为 0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.