cordon-node
Mark a Kubernetes node as unschedulable to prevent new pods from being scheduled on it, useful for maintenance or troubleshooting.
Instructions
Mark a node as unschedulable
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | The name of the node to cordon |
Implementation Reference
- server.js:2100-2107 (handler)The execution handler for the cordon-node tool, which destructures the node name from input arguments, constructs and executes the 'kubectl cordon <node>' command using execAsync, and returns the command stdout or a success message.case "cordon-node": { const { node } = args; const cmd = `kubectl cordon ${node}`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || `Node ${node} cordoned` }] }; }
- server.js:1129-1138 (schema)Input schema for the cordon-node tool, specifying an object with a required 'node' property of type string, describing the Kubernetes node name to cordon.inputSchema: { type: "object", properties: { node: { type: "string", description: "The name of the node to cordon" } }, required: ["node"] }
- server.js:1127-1138 (registration)Registration of the 'cordon-node' tool within the tools array provided to the ListToolsRequestSchema handler. Includes tool name, description, and input schema.name: "cordon-node", description: "Mark a node as unschedulable", inputSchema: { type: "object", properties: { node: { type: "string", description: "The name of the node to cordon" } }, required: ["node"] }