Control plane
A node goes dark
Heartbeats and eviction
Node leases stop renewing, the node turns NotReady, and its Pods are rescheduled after the toleration runs out. node-2 loses power mid-morning. Nothing crashes, nothing is notified - the control plane notices an absence, waits out two timers, and rebuilds the missing third of the workload on node-1.
- Heartbeat
- a Lease renewed every 10 s
- Detection
- 40 s of silence → NotReady
- Grace
- tolerationSeconds 300 on every Pod
- Replacements
- node-1 · total ≈ 5 min 40 s
Read the whole lesson as text
1. The heartbeat
node-2's kubelet proves it's alive by renewing a Lease - a tiny object in the kube-node-lease namespace - every 10 seconds. The lease costs almost nothing to write, which is the point: node heartbeats used to patch the whole Node object, hammering etcd in big clusters. The full Node status is only re-sent when something changes, or every five minutes; the lease is the fast pulse.
- node-2 renews its lease - healthy, as it has been all morning.
- Between one heartbeat and the next, node-2 loses power. Nothing is sent; the next renewal just never comes.
2. Silence measures out
The node-lifecycle controller - a loop like any other - checks every node's lease against the clock. At 40 seconds of silence it acts twice: node-2's Ready condition flips to Unknown, and the taint node.kubernetes.io/unreachable:NoExecute lands on the node. It also marks node-2's Pods not ready. node-2's kubelet can't object; it's off.
- Forty seconds after the last renewal, the controller declares node-2 NotReady.
- The dark node's Pods are marked not ready, so the Service stops sending them new traffic.
3. The grace
The taint says execute nothing here - but existing Pods don't vanish, because every Pod carries an automatic toleration for unreachable that lasts 300 seconds. The wait is a bet: most failures are transient, and evicting a node's workload onto survivors is expensive. So the cluster holds its breath for five minutes - recover in time and the Pods never noticed.
- For five minutes, the system deliberately does nothing about the missing Pods.
4. Evicted
The toleration expires and the taint-eviction controller deletes the Pods. It's an ordinary graceful delete: deletionTimestamp is set and the API waits for the kubelet to confirm, which can't happen, so the objects sit in Terminating. That's enough for the ReplicaSet controller, which doesn't count terminating Pods. Seeing 1 of 3, it does exactly what the last lesson showed: creates replacements, and the scheduler places them on node-1. Detection 40 s, grace 300 s, rebuild ~7 s.
- The grace runs out and the Pods are deleted. They stay Terminating, because no kubelet can confirm.
- The ReplicaSet does its ordinary arithmetic: wants 3, has 1, creates 2.
- Seven seconds later, three web Pods are Ready again - all on node-1.
5. The node returns
Power comes back. node-2's kubelet starts, renews the lease, and the controller flips the node Ready and drops the taint - the reverse of step 2. The kubelet's first chore is cleanup: it sees the two Terminating Pods, confirms they're gone, and their objects are finally removed. The scheduler will use node-2 for future Pods; the web Pods that ran there are history, replaced on node-1 four minutes ago. A returned node contributes capacity, not continuity.
- node-2's kubelet boots and renews its lease like nothing happened.
- One update later the node is Ready and schedulable, empty and willing.
Summary
A dead node is detected as an absence, absorbed as a capacity loss, and repaired by ordinary reconcile loops once the grace expires: 40 seconds to notice, 300 to give it the benefit of the doubt, seven to rebuild. The two timers are the whole policy - shrink both for faster failover, raise both to ride out blips without churning your workload.
Next lesson: Graceful shutdown