🎉 DevOps Interview Prep Bundle is live — 1000+ Q&A across 20 topicsGet it →
All Articles

Kubernetes 1.37 Node Lifecycle Conditions: A Practical Operations Guide

Use Kubernetes 1.37 Node Lifecycle Conditions to report drains and maintenance without confusing status signals with scheduling controls.

DevOpsBoys4 min read
Share:Tweet

A node can be Ready while it is about to enter maintenance. It can also be cordoned while operators cannot tell whether a drain is starting, complete, or stuck. Kubernetes 1.37 introduces a shared vocabulary for that missing operational state: Node Lifecycle Conditions.

The feature is useful, but its first release has a crucial limitation. These conditions report lifecycle state; they do not perform lifecycle operations.

The Five New Conditions

Kubernetes 1.37 reserves five well-known Node condition types:

ConditionMeaning
DrainInProgressA drain is actively evicting Pods according to the operator's criteria.
DrainedThe node meets the operator's chosen drain-completion criteria.
MaintenancePlannedMaintenance is expected in the future.
MaintenanceInProgressMaintenance work is currently happening.
GracefulNodeShutdownInProgressThe node is going through graceful shutdown.

Each condition uses the familiar Kubernetes condition fields: status, reason, message, and lastTransitionTime. A stable reason is valuable for automation; a clear message is valuable for humans.

What the Conditions Do Not Do

In Kubernetes 1.37, the NodeLifecycleConditions feature gate is alpha and disabled by default. The gate is effectively a placeholder for future built-in behavior. You do not need to enable it merely to publish these conditions.

No core workload controller acts on these conditions in this release. Setting MaintenanceInProgress=True does not:

  • cordon the node;
  • add a taint;
  • evict a Pod;
  • enforce a PodDisruptionBudget;
  • stop the scheduler from placing new workloads;
  • prove that every Pod has left the node.

Continue to use kubectl cordon, kubectl drain, taints, cloud-provider operations, and workload-specific controls to change behavior. Use the conditions to expose what that automation is doing.

A Safe Maintenance State Machine

A maintenance controller can publish a sequence such as:

text
MaintenancePlanned=True
        ↓
cordon node
        ↓
DrainInProgress=True
        ↓
Drained=True, DrainInProgress=False
        ↓
MaintenanceInProgress=True
        ↓
MaintenanceInProgress=False
        ↓
uncordon node and clear MaintenancePlanned

The exact order depends on your operation. A kernel live patch may not require a drain, while a Kubernetes node upgrade normally should.

Define what Drained means before implementing it. Some teams require zero non-DaemonSet Pods. Others tolerate specific local agents or maintenance Pods. The condition reports the criteria chosen by the administrator; Kubernetes does not impose one universal definition.

Publishing a Condition

An authorized controller can patch the Node status subresource. Conceptually, the resulting status looks like this:

yaml
status:
  conditions:
    - type: MaintenancePlanned
      status: "True"
      reason: ScheduledNodeUpgrade
      lastTransitionTime: "2026-09-25T02:00:00Z"
      message: "Node upgrade is scheduled in change window CHG-1042"

Do not use a broad service account simply because Nodes are cluster-scoped. Give the controller only the verbs and resources it requires, audit status updates, and protect the component that owns the condition.

Avoid multiple writers for the same condition type. Two controllers that repeatedly overwrite reason, message, or status create noisy transitions and unreliable automation. Assign one owner per lifecycle signal and document how stale conditions are cleared after a crash.

Make the Signal Observable

Before letting automation consume the conditions, expose them in inventory, dashboards, and alerts. At minimum, show:

  • nodes with planned maintenance and the start window;
  • how long DrainInProgress has remained true;
  • nodes marked Drained that still host unexpected workloads;
  • nodes in maintenance that are still schedulable;
  • stale conditions whose owning operation no longer exists.

A stuck-drain alert should combine the lifecycle condition with evidence from Pods and disruption budgets. The condition tells you what the automation believes; live cluster state tells you whether that belief is still correct.

For example, inspect a node and its workloads together:

bash
kubectl describe node NODE_NAME
kubectl get pods -A --field-selector spec.nodeName=NODE_NAME -o wide
kubectl get pdb -A

If eviction is blocked, follow the PDB blocking node drain guide instead of manually declaring the node drained.

Adoption Checklist

Start with visibility rather than automated decisions:

  1. Define a state model and the meaning of Drained.
  2. Assign one authoritative writer for each condition.
  3. Publish conditions in a non-production cluster.
  4. Display them in the platform dashboard and change timeline.
  5. Alert on stuck or contradictory states.
  6. Test controller restarts during every transition.
  7. Only then let other automation react to the signals.

Because core Kubernetes components do not consume the conditions in 1.37, any automation you build around them is your contract. Version that contract, test Unknown states, and fail conservatively when the writer becomes unavailable.

Why This Matters

Node maintenance crosses schedulers, autoscalers, cloud APIs, storage systems, workload owners, and on-call teams. Until now, each integration often invented annotations or external records to describe progress.

Node Lifecycle Conditions provide a common status channel. Their immediate value is not automatic remediation; it is a consistent answer to a basic operational question: what is happening to this node right now?

Sources

🔧

Today I Fixed

Short real fixes from production — posted daily

Browse fixes
Newsletter

Stay ahead of the curve

Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.

Related Articles

Comments