Skip to content

kx cordon

Marks a node unschedulable, so the scheduler places no new pods on it. Pods already running there are left alone — use kx drain to evict those.

Takes several indexes, and ranges, like kx delete.

kubectl’s own cordon flags pass through, --dry-run among them.

A flag kx doesn’t know is refused; put it after -- to pass it through to kubectl.

Usage

kx cordon [OPTIONS] <index>... [kubectl flags]

Arguments

ArgumentDescription
<index>...Row number from the current listing, or @name for a mark; kx state or kx mark shows them

Options

OptionDescription
--dry-run[=string]client or server to preview the change without making it, as kubectl takes it; kx’s line says nothing was changed

Passthrough options

OptionDescription
-l, --selector stringSelector (label query) to filter on, supports ‘=’, ‘==’, ‘!=’, ‘in’, ’notin’.(e.g. -l key1=value1,key2=value2,key3 in (value3)). Matching objects must satisfy all of the specified label constraints.
…kubectl’s global flags too: --context, --kubeconfig, --as and the rest; kubectl options lists them

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx cordon 1
kx cordon 1 3
kx cordon 1..3
kx cordon 1 --dry-run=server