In this article
The pinned client-go implementation tolerates clock offset through local observations, but rate drift and API latency still constrain renewal; Leases do not fence external writes.
A controller changes leaders repeatedly while node heartbeat Leases still renew. A dashboard groups both events as expired locks. That classification hides different observers and timing contracts. A Lease is an API object used by several protocols; its fields alone do not establish the behavior of every client.
Name the Lease protocol
The Kubernetes Lease concepts describe kubelet heartbeats: a Node’s matching Lease in kube-node-lease is renewed through spec.renewTime, and the control plane uses that timestamp for availability decisions. Component leader election is another use. Record namespace, object identity, holder and owning component before comparing events. A stalled heartbeat is evidence of a missing update, with several possible causes; it does not independently establish that the machine or application process has stopped.
Read the selected client’s timing contract
The client-go leader-election reference, pinned here to v0.34.0, describes a different observation rule. It captures time locally and uses changes in the election record to recognize renewal, rather than trusting remote timestamps as accurate local time. Consequently, arbitrary clock offsets differ from clocks advancing at different rates. Do not generalize this implementation detail into a claim that every Kubernetes heartbeat consumer ignores recorded timestamps.
Separate offset from rate drift
A constant timestamp offset changes displayed chronology; a clock running faster changes how quickly a renewal interval elapses locally. The client reference relates tolerated rate differences approximately to LeaseDuration and RenewDeadline. These are configuration relationships, not measured guarantees for a workload. Longer intervals also delay some transitions. The etcd restoration guide concerns revision continuity, illustrating why logical progress and elapsed wall time need separate evidence.
Investigate API delay independently
Capture renewal attempts, responses, errors and locally measured durations alongside leader transitions. Healthy clock synchronization cannot remove API latency or a paused process. Conversely, a transition during a slow request does not prove the clock was wrong. Keep node heartbeat observations and component election traces in separate timelines linked by component identity. Preserve logs before disruptive recovery; the cleanup ownership guide explains why changing API metadata can hide an unresolved lifecycle rather than repair it.
Check cancellation and guarded work
The pinned client documentation explicitly disclaims fencing. It also warns that ReleaseOnCancel requires guarded work to have completed before cancellation, otherwise critical work can overlap. Verify which context stops election and which actually stops the application. In a disposable exercise, delay guarded shutdown and observe whether external actions continue after leadership changes. An election transition should not be accepted as proof that an earlier holder lost permission at a separate storage system.
Retain a bounded diagnosis
Accept an explanation only when it connects the selected protocol, timing configuration, local renewal evidence and actual application lifecycle. Report clock-rate drift, API delay or missing observations separately when evidence cannot distinguish them. No interval setting alone proves exclusive external writes. A robust recovery design needs explicit authority at the effect target, plus a documented response when election is lost; a dashboard showing a current holder is merely an observation of the coordination record.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.