Node Selectors and Affinity
Control where Pods are scheduled using node selectors and more expressive node and Pod affinity rules.
Control Where Pods Land
By default, Kubernetes schedules Pods on any available node. But what if you need more control?
Sometimes, you need Pods to run on specific nodes. Maybe those nodes have special hardware, licenses, or are in certain availability zones.
This lesson explores how to guide Kubernetes' scheduler using Node Selectors and Node Affinity.
Why Guide the Scheduler?
Imagine you have a database Pod that needs to run on a node with high-performance SSDs, or a GPU-intensive application that requires specific hardware.
You might also want to keep certain Pods away from each other for fault tolerance, or ensure they run on nodes with specific operating systems.
Kubernetes provides tools to express these scheduling preferences.
All lessons in this course
- Resource Requests and Limits
- Node Selectors and Affinity
- Taints and Tolerations
- Pod Priority and Preemption