kubectl-cordon
marks a node as unschedulable
TLDR
Cordon node
SYNOPSIS
kubectl cordon [options] node
DESCRIPTION
kubectl cordon marks one or more Kubernetes nodes as unschedulable by setting the `node.kubernetes.io/unschedulable` taint on the node object. Once cordoned, the scheduler will not place any new pods on the node, but existing pods already running on it continue to operate normally and are not affected.
Cordoning is typically the first step in a node maintenance workflow, followed by `kubectl drain` to gracefully evict the running pods. It is also useful for isolating a node that is exhibiting problems -- such as high resource usage or hardware errors -- while you investigate, without disrupting workloads already running there.
To return a cordoned node to normal scheduling, use `kubectl uncordon`. The cordon state can be verified by checking the node's status with `kubectl get nodes`, where cordoned nodes display a `SchedulingDisabled` status.
PARAMETERS
NODE
Node name to cordon.-l SELECTOR
Label selector.--dry-run MODE
Simulate operation.--help
Display help information.
CAVEATS
Subcommand of kubectl. Use with drain for maintenance. Uncordon to restore.
HISTORY
kubectl cordon provides node scheduling control for Kubernetes cluster maintenance.
SEE ALSO
kubectl(1), kubectl-drain(1), kubectl-uncordon(1)
