cordon-node

X-McKay's avatarfrom X-McKay

Mark a node as unschedulable to prevent new pods from being scheduled. Use when a node is experiencing issues and needs maintenance. Existing pods continue running. Keywords: cordon, node maintenance, unschedulable, node issues.

1stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill automates the Kubernetes 'cordon' process, allowing users to mark a specific cluster node as unschedulable. It is an essential tool for DevOps and SRE teams to isolate nodes during maintenance or troubleshooting, ensuring that no new pods are scheduled on the affected node while allowing existing workloads to continue running undisturbed.

Use Cases

  • Scheduled Node Maintenance: Safely preparing a Kubernetes node for hardware upgrades or OS patching by preventing new pod assignments.
  • Incident Remediation: Quickly isolating a node that is exhibiting performance degradation or errors to prevent it from impacting new service deployments.
  • Graceful Decommissioning: Marking a node as unschedulable as the first step in a cluster scale-down or node replacement workflow.
  • Resource Pressure Management: Temporarily stopping new workloads on a specific node that is nearing resource limits to maintain cluster stability.
namecordon-node
description>
pods continue running. Keywordscordon, node maintenance, unschedulable,
domaink8s
categoryremediation
requires-approvaltrue
confidence0.9

Cordon Node

Preconditions

Before applying this skill, verify:

  • Node name is known
  • Node is currently schedulable
  • Cordoning won't cause capacity issues

Actions

1. Verify Node Status

Check current node state before cordoning.

mcp_tool: kubernetes-mcp-server/resources_get
params:
  apiVersion: v1
  kind: Node
  name: $node_name
timeout: 30s

2. Cordon the Node

Mark node as unschedulable using patch.

mcp_tool: kubernetes-mcp-server/resources_create_or_update
params:
  resource: |
    apiVersion: v1
    kind: Node
    metadata:
      name: $node_name
    spec:
      unschedulable: true
timeout: 30s

3. Verify Cordon Status

Confirm node is now unschedulable.

mcp_tool: kubernetes-mcp-server/resources_get
params:
  apiVersion: v1
  kind: Node
  name: $node_name
timeout: 30s

Success Criteria

The skill succeeds when:

  • Node spec.unschedulable is true
  • Node shows SchedulingDisabled condition
  • Existing pods continue running

Failure Handling

If cordoning fails:

  1. Check node exists
  2. Verify cluster permissions
  3. Check for control plane issues

Examples

Input Context:

{
  "node_name": "worker-node-3"
}

Output:

{
  "node": "worker-node-3",
  "previous_state": "schedulable",
  "current_state": "unschedulable",
  "running_pods": 15,
  "success": true
}