[英]What is the difference between current and available pod replicas in kubernetes deployment?
I am trying to get my hands dirty on Kubernetes. 我想在Kubernetes上弄脏手。 I am firing following command:
我正在按照命令触发:
kubectl get deployment
and I get the following headers in the output: 我在输出中得到以下标题:
I can't find the difference between current
and available
columns in the following output? 我在以下输出中找不到
current
列和available
列之间的区别?
I know that official documentation gives a small description each of these fields, but it doesn't answer my following questions: 我知道官方文档给出了每个字段的小描述,但它没有回答我的以下问题:
Current
<= Desired
true? Current
<= Desired
真的吗? Up-to-Date
<= Current
true? Up-to-Date
<= Current
真的吗? Up-to-Date
> Current
and Up-to-Date
<= Desired
true? Up-to-Date
> Current
和Up-to-Date
<= Desired
真的吗? Available
always <= Current
OR it can be > Available
? Available
<= Current
或它可以> Available
? In short, what is the relation between all these fields? 简而言之,所有这些领域之间的关系是什么?
The Deployment object specifies the desired state of your Deployment, and the Deployment Controller drives the current state of the system towards the desired state. Deployment对象指定部署的所需状态,Deployment Controller将系统的当前状态驱动到所需状态。
The Desired
field specifies the number of replicas you asked for, while the Current
field specifies the number of replicas that are currently running in the system. Desired
字段指定您要求的副本数,而Current
字段指定当前在系统中运行的副本数。 The Up-To-Date
field indicates the number of replicas that are up to date with the desired state. “
Up-To-Date
字段指示具有所需状态的最新副本数。 The Available
field shows the number of replicas that are passing readiness probes (if defined). “
Available
字段显示通过就绪探针(如果已定义)的副本数。
Is Current
always <= Desired
? Current
总是<= Desired
? No, current can be greater than desired during a deployment update. 不,在部署更新期间,当前可能大于期望值。
Is Up-to-date
always <= Current
? Up-to-date
总是<= Current
? I believe the answer here is yes. 我相信这里的答案是肯定的。
Is Up-to-date
> Current
? 是
Up-to-date
> Current
? No, up-to-date should be the same as current, or less than current during a deployment update. 不,最新应与部署更新期间的当前或小于当前相同。
Is Available
always <= Current
? Available
<= Current
? Yes. 是。
I encourage you to go through a deployment update and scale out/in while using watch
to monitor these fields as the controller converges current state to desired state. 我鼓励您在使用
watch
监视这些字段时进行部署更新和扩展/输入,因为控制器会将当前状态收敛到所需状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.