我有一个简单的 kubernetes 部署,其中包含 3 个 nginx 容器副本。
这里的 Kubernetes 文档说:
注意:当且仅当 Deployment 的 pod 模板(即 .spec.template)发生更改时才会触发 Deployment 的推出,例如,如果模板的标签或容器图像被更新。其他更新(例如扩展部署)不会触发部署。
但是,当我扩展我的部署时,它确实会触发部署。我在这里想念什么?:
C:\Kubernetes>kubectl scale deployment myapp-deployment --replicas=20
deployment "myapp-deployment" scaled
C:\Kubernetes>kubectl rollout status deployment/myapp-deployment
Waiting for rollout to finish: 3 of 20 updated replicas are available...
Waiting for rollout to finish: 4 of 20 updated replicas are available...
Waiting for rollout to finish: 5 of 20 updated replicas are available...
Waiting for rollout to finish: 6 of 20 updated replicas are available...
Waiting for rollout to finish: 7 of 20 updated replicas are available...
Waiting for rollout to finish: 8 of 20 updated replicas are available...
Waiting for rollout to finish: 9 of 20 updated replicas are available...
Waiting for rollout to finish: 10 of 20 updated replicas are available...
Waiting for rollout to finish: 11 of 20 updated replicas are available...
Waiting for rollout to finish: 12 of 20 updated replicas are available...
Waiting for rollout to finish: 13 of 20 updated replicas are available...
Waiting for rollout to finish: 14 of 20 updated replicas are available...
Waiting for rollout to finish: 15 of 20 updated replicas are available...
Waiting for rollout to finish: 16 of 20 updated replicas are available...
Waiting for rollout to finish: 17 of 20 updated replicas are available...
Waiting for rollout to finish: 18 of 20 updated replicas are available...
Waiting for rollout to finish: 19 of 20 updated replicas are available...
deployment "myapp-deployment" successfully rolled out