Skip to Content
Kubernetes即学即用(第二版)
book

Kubernetes即学即用(第二版)

by Brendan Burns, Joe Beda, Kelsey Hightower
June 2021
Intermediate to advanced
300 pages
5h 4m
Chinese
China Electric Power Press Ltd.
Content preview from Kubernetes即学即用(第二版)
266
18
替换参数后的结果为:
metadata:
name: my-release-deployment
18.4.2
在文件系统布局中使用参数
到此为止,你学习了如何在配置中使用参数,但如何将其应用到我们先前描
述的文件系统布局呢?我们不能将每个部署生命周期阶段都视为指向某个版
本的指针,而是应该将每个部署生命周期作为一个参数文件和指向特定版本
的指针的组合。例如,在基于目录的布局中:
frontend/
staging/
templates -> ../v2
staging-parameters.yaml
production/
templates -> ../v1
production-parameters.yaml
v1/
frontend-deployment.yaml
frontend-service.yaml
v2/
frontend-deployment.yaml
frontend-service.yaml
...
使用版本控制执行此操作的方法与之类似,只不过每个生命周期阶段的参数
都保存在配置目录树的根目录中:
frontend/
staging-parameters.yaml
templates/
frontend-deployment.YAML
....
18.5
部署全球性的应用程序
现在你的应用程序已经有了多个版本,对应于部署的多个阶段,接下来结构
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
Python数据分析

Python数据分析

Posts & Telecom Press, Ivan Idris
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin
Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé

Publisher Resources

ISBN: 9787519856762