1. 程式人生 > >k8s調度的親和性和反親和性

k8s調度的親和性和反親和性

www req 版本 ngs shu -a 不支持 ffi 導致

文章轉自

http://ju.outofmemory.cn/entry/278349

https://www.jianshu.com/p/102c4df69af9

RequiredDuringSchedulingRequiredDuringExecution :在調度期間要求滿足親和性或者反親和性規則,如果不能滿足規則,則POD不能被調度到對應的主機上。在之後的運行過程中,如果因為某些原因(比如修改label)導致規則不能滿足,系統會嘗試把POD從主機上刪除(現在版本還不支持)。

RequiredDuringSchedulingIgnoredDuringExecution :在調度期間要求滿足親和性或者反親和性規則,如果不能滿足規則,則POD不能被調度到對應的主機上。在之後的運行過程中,系統不會再檢查這些規則是否滿足。

PreferredDuringSchedulingIgnoredDuringExecution :在調度期間盡量滿足親和性或者反親和性規則,如果不能滿足規則,POD也有可能被調度到對應的主機上。在之後的運行過程中,系統不會再檢查這些規則是否滿足。
## Anti-Affinity setting. The default "hard" will use pod anti-affinity that is
## requiredDuringSchedulingIgnoredDuringExecution to ensure 2 services dont
## end up on the same node. Setting this to "soft" will use
## preferredDuringSchedulingIgnoredDuringExecution. If set to anything else,
## no anti-affinity rules will be configured.
antiAffinity: "soft"
配置設置成hard則不會調度到同一個節點

k8s調度的親和性和反親和性