当前位置:网站首页>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以保证服务可以被客户端正常访问,可以通过以下参数指定: 边栏推荐
- 炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
- Complete interview questions for interviewers and senior Android engineers in front-line Internet enterprises
- 期货如何网上开户?安不安全?
- leetcode刷题:二叉树16(路径总和)
- Go language learning tutorial (XV)
- 【数字IC验证快速入门】1、浅谈数字IC验证,了解专栏内容,明确学习目标
- [quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
- What is PyC file
- USACO3.4 “破锣摇滚”乐队 Raucous Rockers - DP
- Unity编辑器扩展 UI控件篇
猜你喜欢
![[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp](/img/32/738df44b6005fd84b4a9037464e61e.jpg)
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp

IC科普文:ECO的那些事儿

. Net distributed transaction and landing solution

关于BRAM IP复位的优先级

.Net分布式事务及落地解决方案

Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)

Guidelines for application of Shenzhen green and low carbon industry support plan in 2023

Rainbond 5.7.1 支持对接多家公有云和集群异常报警

leetcode刷题:二叉树11(平衡二叉树)
![[quick start of Digital IC Verification] 1. Talk about Digital IC Verification, understand the contents of the column, and clarify the learning objectives](/img/90/88a1f79a07016738d2688548e21949.png)
[quick start of Digital IC Verification] 1. Talk about Digital IC Verification, understand the contents of the column, and clarify the learning objectives
随机推荐
建立自己的网站(16)
Ffplay document [easy to understand]
Tasks in GStreamer
Jvmrandom cannot set seeds | problem tracing | source code tracing
Database logic processing function
实操演示:产研团队如何高效构建需求工作流?
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Leetcode brush questions: binary tree 11 (balanced binary tree)
Common operators and operator priority
Go language | 03 array, pointer, slice usage
处理文件和目录名
Go language learning tutorial (XV)
Wechat applet regular expression extraction link
Go language | 01 wsl+vscode environment construction pit avoidance Guide
Oracle-表空间管理
微信小程序正则表达式提取链接
Debezium series: modify the source code to support drop foreign key if exists FK
A solution to PHP's inability to convert strings into JSON
BZOJ 3747 POI2015 Kinoman 段树
Debezium series: modify the source code to support UNIX_ timestamp() as DEFAULT value