Comparison
EvictionvsNode drain
Eviction
a healthy workload was terminated because the node it happened to be on ran out of disk, and it had done nothing wrong.
The platform terminating running workloads to relieve pressure on a node — memory, disk or PIDs — choosing victims by QoS class and by how far over their requests they are. It is a deliberate sacrifice rather than a failure, and it is why a workload can die for reasons entirely outside its own behaviour. Disk pressure from unbounded logs or image sprawl is the most common trigger and the easiest to prevent.
Full entry →Node drain
you mark the machine unschedulable and evict everything on it politely, so the upgrade takes an hour instead of a page.
The two-step process for taking a node out of service: cordon it so nothing new is scheduled there, then evict what is running so it moves elsewhere. It is the routine operation behind every upgrade, resize and spot reclamation, and it is where disruption budgets, grace periods and shutdown handling are all tested at once. A drain that hangs is nearly always a workload with no other place to go or a budget that cannot be met.
Full entry →