first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
37
CloudNative/Kubernetes/Base/亲和性调度
Normal file
37
CloudNative/Kubernetes/Base/亲和性调度
Normal file
|
@ -0,0 +1,37 @@
|
|||
pod.spec.affinity.PodAffinity,pod亲和性
|
||||
必须和某些pod调度到一起:requiredDuringScheduingIgnoredDuringExecution
|
||||
优先和某些pod调度到一起:PreferredDuringScheduingIgnoredDuringExecution
|
||||
|
||||
pod.spec.affinity.PodAntiAffinity,pod反亲和性
|
||||
禁止和某些pod调度到一起:requiredDuringScheduingIgnoredDuringExecution
|
||||
优先不和某些pod调度到一起:PreferredDuringScheduingIgnoredDuringExecution
|
||||
|
||||
pod.spec.affinity.nodeAffinity,node亲和性,必须调度到
|
||||
禁止调度到:requiredDuringScheduingIgnoredDuringExecution
|
||||
优先不和某些pod调度到一起:PreferredDuringScheduingIgnoredDuringExecution
|
||||
|
||||
pod.spec.nodeSelector,强制调度到带有某些标签的node中
|
||||
|
||||
node加上taints(污点)
|
||||
一个node上可以有多个Taints
|
||||
spec.taints中的effect不能为空,有三个不同的级别
|
||||
NoSchedule: 禁止新的pod调度上来
|
||||
PreferNoSchedule: 新pod尽量不调度上来
|
||||
NoExecute: 驱逐(evict)没有对应toleration的pod,也不会调度新的上来
|
||||
|
||||
apiVersion: v1
|
||||
kind: Node
|
||||
metadata:
|
||||
name: demo-node
|
||||
spec:
|
||||
taints:
|
||||
- key: 'k1'
|
||||
value: 'v1'
|
||||
effect: 'NoSchedul'
|
||||
|
||||
pod加上tolerations(容忍)
|
||||
一个pod上可以有多个tolerations
|
||||
effect可以为空,匹配所有
|
||||
取值与taints的effect一致
|
||||
|
||||
oprater: Exist/Equal
|
Loading…
Add table
Add a link
Reference in a new issue