Anti-Affinity とは?
anti-affinity は affinity の逆で、セレクターに一致する他の pod の近くに pod を配置しないよう scheduler に指示します。一般的にはサービスのレプリカを別々の node やゾーンへ分散させるために使われます。affinity と同様に、required と preferred のバリアントがあります。
なぜ重要か
anti-affinity は、単一の障害でサービス全体が失われるような 1 つの node に、サービスのすべてのコピーが集まるのを防ぎます。高可用性の deployment に不可欠です。
関連ガイド
What Are Affinity Rules?Affinity rules guide the scheduler to place a pod near specific nodes or other pods, expressed as preferred o…
What Is Pod Topology Spread?Pod topology spread constraints tell the scheduler to distribute matching pods evenly across domains like zon…
What Are Taints by Condition?Taints by condition are taints the control plane automatically adds to a node when it enters a bad state, rep…