cordon-node
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.
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.
| name | cordon-node |
|---|---|
| description | > |
| pods continue running. Keywords | cordon, node maintenance, unschedulable, |
| domain | k8s |
| category | remediation |
| requires-approval | true |
| confidence | 0.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:
- Check node exists
- Verify cluster permissions
- 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
}