Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand Rolling Update

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to understand Rolling Update. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Rolling Update updates only a small number of copies at a time. After success, more copies will be updated, and finally all copies will be updated. The biggest advantage of rolling updates is zero downtime, and there is always a copy running in the whole update process, thus ensuring business continuity.

Next, we deploy three copies of the application, the initial image is httpd:2.2.31, and then update it to httpd:2.2.32.

The configuration file for httpd:2.2.31 is as follows:

Deployed through kubectl apply.

We found the following changes:

The image of Deployment httpd is updated to httpd:2.2.32

A new ReplicaSet httpd-1276601241 is created, mirrored as httpd:2.2.32, and three new Pod are managed.

There is no Pod in the previous ReplicaSet httpd-551879778.

The conclusion is that the three httpd:2.2.31 Pod of ReplicaSet httpd-551879778 has been replaced by the three httpd:2.2.32 Pod of ReplicaSet httpd-1276601241.

The specific process can be viewed through kubectl describe deployment httpd.

Update and replace only one Pod at a time:

ReplicaSet httpd-1276601241 adds one Pod to the total of 1.

ReplicaSet httpd-551879778 decreases by one Pod, with a total of 2.

ReplicaSet httpd-1276601241 adds one Pod to the total of 2.

ReplicaSet httpd-551879778 decreases by one Pod, with a total of 1.

ReplicaSet httpd-1276601241 adds one Pod to the total of 3.

ReplicaSet httpd-551879778 decreases by one Pod, with a total of 0.

The number of Pod replaced each time can be customized. Kubernetes provides two parameters, maxSurge and maxUnavailable, to finely control the number of Pod replacements, which we will discuss later in conjunction with the Health Check feature.

On how to understand Rolling Update to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report