当前位置:网站首页>y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
2022-07-05 20:11:00 【Raymond999999】
12.3 滚动更新和回滚
在指定的deployment中通过kubectl set image指定新版本的 镜像:tag 来实现更新代码的目的。
构建三个不同版本的nginx镜像,第一次使用v1版本,后组逐渐升级到v2与v3,测试镜像版本升级与回滚操作
deployment控制器支持两种更新策略:默认为滚动更新
1.滚动更新(rolling update):
滚动更新是默认的更新策略,滚动更新是基于新版本镜像创建新版本pod,然后删除一部分旧版本pod,然后再创建新版本pod,再删除一部分旧版本pod,直到就版本pod删除完成,滚动更新优势是在升级过程当中不会导致服务不可用,缺点是升级过程中会导致两个版本在短时间内会并存。
具体升级过程是在执行更新操作后k8s会再创建一个新版本的ReplicaSet控制器,在删除旧版本的ReplicaSet控制器下的pod的同时会在新版本的ReplicaSet控制器下创建新的pod,直到旧版本的pod全部被删除完后再把就版本的ReplicaSet控制器也回收掉。
在执行滚动更新的同时,为了保证服务的可用性,当前控制器内不可用的pod(pod需要拉取镜像执行创建和执行探针探测期间是不可用的)不能超出一定范围,因为需要至少保留一定数量的pod以保证服务可以被客户端正常访问,可以通过以下参数指定: 边栏推荐
- leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)
- How to select the Block Editor? Impression notes verse, notation, flowus
- Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
- Build your own website (16)
- DP:树DP
- Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized
- MySql的root密码忘记该怎么找回
- 建立自己的网站(16)
- 点云文件的.dat文件读取保存
- Scala基础【HelloWorld代码解析,变量和标识符】
猜你喜欢

Fundamentals of deep learning convolutional neural network (CNN)

无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...

CADD课程学习(7)-- 模拟靶点和小分子相互作用 (半柔性对接 AutoDock)

解决php无法将string转换为json的办法

Parler de threadlocal insecurerandom

Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?

ACM getting started Day1

. Net distributed transaction and landing solution

【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
![[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design](/img/92/7af0db21b3d7892bdc5dce50ca332e.png)
[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
随机推荐
2023年深圳市绿色低碳产业扶持计划申报指南
字节跳动Dev Better技术沙龙成功举办,携手华泰分享Web研发效能提升经验
Wechat applet regular expression extraction link
sun.misc.BASE64Encoder报错解决方法[通俗易懂]
基金网上开户安全吗?去哪里开,可以拿到低佣金?
Zero cloud new UI design
实操演示:产研团队如何高效构建需求工作流?
How to retrieve the root password of MySQL if you forget it
深度學習 卷積神經網絡(CNN)基礎
The difference between ID selector and class selector
Is the education of caiqiantang reliable and safe?
Debezium series: idea integrates lexical and grammatical analysis ANTLR, and check the DDL, DML and other statements supported by debezium
Is it safe for Galaxy Securities to open an account online?
leetcode刷题:二叉树11(平衡二叉树)
Oracle-表空间管理
Debezium series: modify the source code to support UNIX_ timestamp() as DEFAULT value
js方法传Long类型id值时会出现精确损失
中金财富在网上开户安全吗?
秋招字节面试官问你还有什么问题?其实你已经踩雷了
Database logic processing function