Affinity, taints and tolerations serve different purposes in Kubernetes pod scheduling:

Taints and Tolerations

Node Affinity

Pod Affinity/Anti-Affinity

Key differences:

A common pattern combines both: use taints/tolerations to reserve nodes for certain workloads, and use affinity to attract the right pods to those nodes.