- 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ù)要素安全流通
- 在你身邊為你設計Ⅲ:騰訊服務設計思維與實戰(zhàn)
- Python數(shù)據(jù)挖掘:入門、進階與實用案例分析
- Spark快速大數(shù)據(jù)分析(第2版)
- Mastering Ninject for Dependency Injection
- 輕松學大數(shù)據(jù)挖掘:算法、場景與數(shù)據(jù)產品
- 商業(yè)分析思維與實踐:用數(shù)據(jù)分析解決商業(yè)問題
- 大數(shù)據(jù):從概念到運營
- Python醫(yī)學數(shù)據(jù)分析入門
- OracleDBA實戰(zhàn)攻略:運維管理、診斷優(yōu)化、高可用與最佳實踐
- Proxmox VE超融合集群實踐真?zhèn)?/a>
- 大數(shù)據(jù)治理與安全:從理論到開源實踐
- 計算機組裝與維護(微課版)
- 數(shù)據(jù)應用工程:方法論與實踐
- 數(shù)據(jù)庫技術與應用:SQL Server 2008