Use the node_management tool for Kubernetes node operations
mainThe node_management tool allows you to manage Kubernetes nodes through several operations: listing nodes, cordoning (marking as unschedulable), draining (evicting pods for maintenance), and uncordoning (re-enabling scheduling).
Available Operations
list: Lists all nodes in the cluster with their current status.cordon: Marks a specific node as unschedulable to prevent new pods from being scheduled.drain: Safely evicts pods from a node. This is a destructive operation that requires specific safety parameters.uncordon: Re-enables scheduling on a previously cordoned node.
Safety Features
- Dry Run: Use
dryRun: trueto preview an operation without executing it. - Confirmation: Drain operations require
confirmDrain: trueto proceed. - DaemonSet Protection: Use
ignoreDaemonsets: trueto prevent drain failures caused by DaemonSet pods. - Timeouts: Use the
timeoutparameter to prevent hanging operations.
{
"operation": "list"
}