[英]kubectl rollout status - When the command complete?
Currently I am using this in my pipeline目前我在我的管道中使用它
kubectl apply -f deployment.yaml && kubectl rollout status -f deployment.yaml
With this in yaml有了这个在yaml
readinessProbe:
tcpSocket:
port: 90
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 1
successThreshold: 1
livenessProbe:
tcpSocket:
port: 90
initialDelaySeconds: 120
periodSeconds: 20
timeoutSeconds: 2
failureThreshold: 1
successThreshold: 1
For me, kubectl rollout is running for a very long time, blocking the deployment pipeline.对我来说,kubectl rollout 运行了很长时间,阻塞了部署管道。 From the documentation
从文档
By default 'rollout status' will watch the status of the latest rollout until it's done
默认情况下,'rollout status' 会观察最新的 rollout 状态,直到它完成
My question:我的问题:
1/ Which actions are the parts that contribute to the deployment "until it's done" (resource creation, resource teardown?... ) 1/ 哪些操作是有助于部署“直到完成”的部分(资源创建、资源拆除?...)
2/ Does readinessProbe and livenessProbe contribute to the deployment time 2/ readinessProbe 和 livenessProbe 对部署时间有影响吗
The criteria for this are in the kubectl
source .其标准在
kubectl
源中。 A deployment is "complete" if:如果出现以下情况,则部署是“完成”的:
You can use kubectl get deployment -w
or kubectl get pod -w
to watch a deployment actually happen in real time;您可以使用
kubectl get deployment -w
或kubectl get pod -w
来实时观察实际发生的部署; the kubectl get -w
option watches the given resources and prints out a new line whenever they change. kubectl get -w
选项kubectl get -w
给定的资源并在它们发生变化时打印出一个新行。 You'll see the following sequence occur (with default Deployment settings, one at a time for "small" deployments):您将看到以下序列发生(使用默认部署设置,“小型”部署一次一个):
So for kubectl rollout status deployment/...
to finish, all of these steps must happen – new pods are created, new pods all pass their health checks, old pods are destroyed – for every replica in the deployment.因此,对于
kubectl rollout status deployment/...
完成,所有这些步骤都必须发生——创建新的 pod,新的 pod 都通过健康检查,销毁旧的 pod——对于部署中的每个副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.