简体   繁体   English

kubernetes,有 2 个 pod 副本

[英]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:在滚动更新中,您有两个变量:

  • maxSurge: The number of pods that can be created above the desired amount of pods during an update maxSurge:在更新期间可以创建的 pod 数量超过所需的 pod 数量
  • maxUnavailable: The number of pods that can be unavailable during the update process maxUnavailable:更新过程中可能不可用的 pod 数量

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.

相关问题 更多副本中的 Kubernetes pod - 反关联规则 - Kubernetes pod in more replicas - anti affinity rule Pod 副本如何相互同步 - Kubernetes? - How pod replicas sync with each other - Kubernetes? Kubernetes部署多个副本-如何将副本编号传递给Pod - Kubernetes deployment multiple replicas - how to pass replica number to pod 具有两个副本的 Kubernetes 部署:一个 pod 正在运行,另一个失败 - Kubernetes deployment with two replicas: One pod is running, the other fails Kubernetes 管理一个集群中不同应用的pod副本之间的流量 - Kubernetes management of traffic between pod replicas of different applications in one cluster 在内容同步方面,Kubernetes Pod副本引起混乱 - Confusion around Kubernetes pod replicas in terms of synchronising content Kubernetes-根据可用资源安排节点上的Pod副本 - Kubernetes - Scheduling pod replicas on nodes as per the resources available kubernetes部署中当前和可用pod复制品之间有什么区别? - What is the difference between current and available pod replicas in kubernetes deployment? Kubernetes水平Pod自动缩放器未根据副本数创建副本 - Kubernetes horizontal pod autoscaler not creating replicas according to replica count Kubernetes在滚动更新时仅更新1个pod而不是全部(2个副本) - Kubernetes updating only 1 pod instead of all ( 2 replicas) on Rolling Update
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM