当前位置:网站首页>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以保证服务可以被客户端正常访问,可以通过以下参数指定: 边栏推荐
- S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
- leetcode刷题:二叉树18(最大二叉树)
- 挖财钱堂教育靠谱安全吗?
- Wechat applet regular expression extraction link
- A solution to PHP's inability to convert strings into JSON
- Analysis of openh264 decoded data flow
- Securerandom things | true and false random numbers
- 【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
- [quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
- 函数的概念及语法
猜你喜欢

浅浅的谈一下ThreadLocalInsecureRandom

JVMRandom不可设置种子|问题追溯|源码追溯

IC科普文:ECO的那些事儿

js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)

Let's talk about threadlocalinsecurerandom

ROS2专题【01】:win10上安装ROS2

Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables

Elk distributed log analysis system deployment (Huawei cloud)

Scala基础【HelloWorld代码解析,变量和标识符】

leetcode刷题:二叉树15(找树左下角的值)
随机推荐
建立自己的网站(16)
Debezium series: modify the source code to support drop foreign key if exists FK
Common operators and operator priority
字节跳动Dev Better技术沙龙成功举办,携手华泰分享Web研发效能提升经验
.Net分布式事务及落地解决方案
C langue OJ obtenir PE, ACM démarrer OJ
1:引文;
[C language] three implementations of quick sorting and optimization details
Debezium series: idea integrates lexical and grammatical analysis ANTLR, and check the DDL, DML and other statements supported by debezium
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
怎么挑选好的外盘平台,安全正规的?
Four methods of random number generation | random | math | threadlocalrandom | securityrandom
. Net distributed transaction and landing solution
leetcode刷题:二叉树12(二叉树的所有路径)
How to safely and quickly migrate from CentOS to openeuler
Cocos2d-x项目总结中的一些遇到的问题
leetcode刷题:二叉树15(找树左下角的值)
银河证券在网上开户安全吗?
sun.misc.BASE64Encoder报错解决方法[通俗易懂]
Guidelines for application of Shenzhen green and low carbon industry support plan in 2023