术语“可用"的意思是“可用".和“不可用"在kubectl中描述部署

编程入门 行业动态 更新时间:2024-10-28 15:25:27
本文介绍了术语“可用"的意思是“可用".和“不可用"在kubectl中描述部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

准备就绪探针成功与否决定了吊舱准备就绪或未就绪.如果我设置 .spec.minReadySeconds = 60 且Readiness探针成功( .readinessProbe.initialDelaySeconds = 1 ),那么当我们创建部署时要少1秒超过60秒,广告连播进入就绪状态,但是部署的状态"如下所示:

Readiness probe success or not determine the pod ready or not ready. If I set the .spec.minReadySeconds = 60 and the Readiness probe is success(.readinessProbe.initialDelaySeconds = 1), so when we created the deployment more than 1 second less than 60 seconds the pod enter the ready status but the deployment's 'status' like below:

kubectl describe deployment readiness-minreadyseconds Name: readiness-minreadyseconds Namespace: default CreationTimestamp: Wed, 21 Sep 2016 10:34:42 +0800 Labels: add=readiness-minreadyseconds Selector: name=readiness-minreadyseconds Replicas: 2 updated | 2 total | 0 available | 2 unavailable StrategyType: RollingUpdate MinReadySeconds: 45 RollingUpdateStrategy: 1 max unavailable, 1 max surge OldReplicaSets: <none> NewReplicaSet: readiness-minreadyseconds-536553145 (2/2 replicas created) Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 2s 2s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set readiness-minreadyseconds-536553145 to 2

我发现我们可以通过nodeport类型从容器访问资源,因此,如果部署中有一些吊舱不可用,它将如何影响我?

I found that we can access the resource from container by type nodeport, so if there are some pod unavailable in the deployment, how it could affect me?

推荐答案

这可能是对术语的误解.从部署文档中,有一个:

This may be a misunderstanding of the terminology. From the deployment documentation, one has:

.spec.minReadySeconds是一个可选字段,用于指定最小值新创建的Pod准备就绪的秒数不会发生任何容器崩溃的情况,以便将其考虑在内可用.

.spec.minReadySeconds is an optional field that specifies the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available.

因此,将 minReadySeconds 设置为60,它需要持续60秒,而不会发生任何崩溃,才能被视为可用".因此,您所看到的是,即使您的广告连播已标记为就绪,它们仍不满足 minReadySeconds 的条件.

So the minReadySeconds is set to 60, it needs to be up for 60 seconds without any crashes to be considered "available". So, what you're seeing is that even though your pods have been marked ready, they're not satisfying that condition of minReadySeconds yet.

更多推荐

术语“可用"的意思是“可用".和“不可用"在kubectl中描述部署

本文发布于:2023-11-25 04:25:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628314.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不可用   术语   quot   kubectl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!