Pod Affinity とは?
pod affinity は、すでにそこで実行されている他のpodのlabelに基づいて、podをnodeに配置するスケジューリングルールです。affinity は局所性のためにpod同士を引き寄せ、anti-affinity は耐障害性のためにpodを離して分散させます。ルールは、node、zone、regionなどのtopology keyによってスコープが定まります。
なぜ重要か
anti-affinity はレプリカを障害ドメインをまたいで分散させるため、単一のnodeやzoneの喪失がサービス全体を停止させることはありません。affinity は密結合なpodをコロケーションし、node間のネットワークレイテンシを削減します。
関連ガイド
What Is Node Affinity?Node affinity is a Kubernetes scheduling rule that attracts or restricts pods to nodes matching specified lab…
What Are Taints and Tolerations?Taints and tolerations are a Kubernetes mechanism that lets a node repel pods unless those pods explicitly to…
What Is a Pod Disruption Budget?A pod disruption budget limits how many pods of a workload can be voluntarily taken down at once, protecting…