- Google Cloud Platform for Architects
- Vitthal Srinivasan Janani Ravi Judy Raj
- 215字
- 2021-06-25 20:48:37
Rolling updates
You can also perform rolling updates. The updates can be container images, configurations, annotations, labels or resource allocation. The term rolling indicates the process's incremental nature to replace one pod at a time (no matter how fast it may be). The reason is to avoid server downtime while distributing updates.
Rolling updates involve updating the workloads of Kubernetes:
- We will use the kubectl set command to perform manual updates. We will update nginx from version 1.10 to 1.12.2:
kubectl set image deployment nginx nginx=nginx:1.12.2
- The kubectl set command updates one pod at a time. To control resource allocation for the updates, you can also provide the following flags:
kubectl set resources deployment nginx --limits=cpu=400m,memory=1024Mi --requests=cpu=200m,memory=512Mi
- Manually updating each and every application would be tiresome and time consuming. Kubernetes also allows us to roll out automatic updates:
kubectl rollout status deployment nginx
- The rollout can also be paused or resumed by using the following command:
kubectl rollout pause deployment nginx kubectl rollout resume deployment nginx
- In case of a misfire, the rollout of an update can also be rolled back to a stable previous version:
kubectl rollout undo deployment nginx --to-revision=3
- In addition to this, the update rollout history can also be viewed by using the following command:
kubectl rollout history deployment nginx
推薦閱讀
- 數(shù)據(jù)庫(kù)基礎(chǔ)教程(SQL Server平臺(tái))
- MySQL高可用解決方案:從主從復(fù)制到InnoDB Cluster架構(gòu)
- 計(jì)算機(jī)綜合設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)
- Word 2010中文版完全自學(xué)手冊(cè)
- Spark快速大數(shù)據(jù)分析(第2版)
- 數(shù)據(jù)庫(kù)開(kāi)發(fā)實(shí)踐案例
- 醫(yī)療大數(shù)據(jù)挖掘與可視化
- R數(shù)據(jù)科學(xué)實(shí)戰(zhàn):工具詳解與案例分析(鮮讀版)
- iOS and OS X Network Programming Cookbook
- 智能數(shù)據(jù)分析:入門(mén)、實(shí)戰(zhàn)與平臺(tái)構(gòu)建
- SQL優(yōu)化最佳實(shí)踐:構(gòu)建高效率Oracle數(shù)據(jù)庫(kù)的方法與技巧
- 基于OPAC日志的高校圖書(shū)館用戶信息需求與檢索行為研究
- Hands-On Mathematics for Deep Learning
- INSTANT Android Fragmentation Management How-to
- Unreal Engine Virtual Reality Quick Start Guide