问题原文
原帖链接 · Nick · CC BY-SA 4.0
As you can see in the picture below, when upgrading nodes to a new version of Kubernetes, the pods on each node are recreated on a new node with a newer version of Kubernetes.
However, it seems that the old pods are being destroyed (Terminating) without waiting for the new pods to be in a Ready state, leading to downtime as the new pods are still in a ContainerCreating state.
Is there an explanation for this, or am I doing something wrong?
已采纳解答
原帖链接 · Robert Bailey · CC BY-SA 4.0
When a node is upgraded, GKE will first drain the pods from the node before removing the deleting the virtual machine and removing from the node from the cluster. The process for terminating a pod is explained in detail here and what you should realize is that this process starts before the new pods is created, scheduled, or starts running.
If you have a deployment and want to keep a specific number of replicas up during the node upgrade process, you should configure pod disruption budgets, with which you can ensure that the node upgrade process will proceed at a slow enough rate to keep enough containers running for your service to handle traffic without any downtime.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
