根據https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
注意:Pod anti-affinity 要求節點有一致的標簽,也就是說集群中的每個節點都必須有一個合適的標簽匹配topologyKey。如果某些或所有節點缺少指定的 topologyKey 標簽,則可能導致意外行為。
當沒有topologyKey標簽時究竟會發生什么?Pod 將被放置在任何地方,一切都會正常作業,否則我應該會出現一些錯誤。
uj5u.com熱心網友回復:
- [來自 Kubernetes 檔案]
目前有兩種型別的節點關聯,稱為 requiredDuringSchedulingIgnoredDuringExecution
和
preferredDuringSchedulingIgnoredDuringExecution.
您可以將它們分別視為“硬”和“軟”,因為前者指定了must be met for a pod to be scheduled onto a node (pod 將處于掛起狀態)、while the latter specifies preferences that the scheduler will try to enforce but will not guarantee(Pod 將被調度到任何可用節點) 的規則。
我認為同樣的規則也適用于 nodeantiaffinity。
uj5u.com熱心網友回復:
經測驗,podAntiAffinitytopologyKey缺失時好像忽略了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/363516.html
標籤:Kubernetes
