Soft vs. Hard Affinity

Difficulty: Advanced

Question

What is 'requiredDuringSchedulingIgnoredDuringExecution' vs 'preferredDuringSchedulingIgnoredDuringExecution'?

Answer

The first is 'Hard' affinity (must match or pod won't schedule). The second is 'Soft' affinity (Kubernetes will try to match, but will schedule elsewhere if it can't).

Concepts covered

Scheduling, Soft/Hard