Node Affinity とは?
node affinity は、nodeのlabelに基づいて、podがどのnodeを好むか、または必要とするかを表現するスケジューリング制約の集合です。ルールはハード(一致がなければpodがスケジュールされない)にも、ソフト(schedulerが尊重しようとするが、そうでなくても進める)にもできます。単純なnode selectorの、labelに基づく後継です。
なぜ重要か
node affinity は、workloadを適切なハードウェアや可用性zoneへ導きます。たとえば、jobを特定のCPUアーキテクチャを持つnodeに固定します。ソフトなルールを使えば、スケジュール不能なpodのリスクを冒すことなく、チームが好みを表現できます。
関連ガイド
What Is Pod Affinity?Pod affinity and anti-affinity are Kubernetes rules that schedule pods near or away from other pods based on…
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 Horizontal Pod Autoscaler?A horizontal pod autoscaler is a Kubernetes controller that adds or removes pod replicas for a workload based…