- 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
推薦閱讀
- Building Computer Vision Projects with OpenCV 4 and C++
- Architects of Intelligence
- Visual Studio 2015 Cookbook(Second Edition)
- Access 2007數據庫應用上機指導與練習
- UDK iOS Game Development Beginner's Guide
- Creating Dynamic UIs with Android Fragments(Second Edition)
- Hadoop大數據實戰權威指南(第2版)
- SQL應用及誤區分析
- 達夢數據庫運維實戰
- Hadoop集群與安全
- 大數據數學基礎(Python語言描述)
- openGauss數據庫核心技術
- Configuration Management with Chef-Solo
- 大數據處理之道
- 用戶畫像:平臺構建與業務實踐