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即学即用(第二版)
守护进程集
159
nodeSelector:
ssd: "true"
containers:
- name: nginx
image: nginx:1.10.0
下面,我们来看一看将守护进程集
nginx-fast-storage
提交到
Kubernetes
API
时会发生什么:
$
kubectl apply -f nginx-fast-storage.yaml
daemonset "nginx-fast-storage" created
由于只有一个带有
ssd=true
标签的节点,因此
nginx-fast-storage Pod
仅在
该节点上运行:
$
kubectl get pods -o wide
NAME STATUS NODE
nginx-fast-storage-7b90t Running k0-default-pool-35609c18-z7tb
如果将
ssd=true
标签添加到其他节点上,则这些节点上也会部署
nginx-
fast-storage Pod
。反之亦然:如果从节点中删除所需的标签,则守护进程
集控制器将删除相应的
Pod
从节点上删除守护进程集的节点选择器所需的标签,则由该守护进程集管理
Pod
也会从节点上删除。
11.4
更新守护进程集
守护进程集非常适合在整个集群中部署服务,但是升级怎么办?在
Kubernetes
1.6
之前,更新由守护进程集管理的
Pod
的唯一方法是更新守护进程集,然后 ...
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