Skip to content
SHC Docs

shc node cordon

stop scheduling new work on a node

Stop placing new deployments on . Nothing running on it is touched: this is the difference between cordon and drain, and it is the whole point: a cordon costs the workloads on the node nothing, so it can be held for as long as you like.

Use it before a drain. Cordon every node you intend to rotate, then drain them one at a time, so the work evacuated from each drain lands on a node you are not about to empty. Without cordon, deployments keep arriving on a node right up to the instant its drain begins.

The cordon binds SHC’s own placement (install-time scoring and drain relocation targets) and the command says so; a compose deploy typed directly against the node still runs there.

Refuses (X409408CLSCRD) on a node that is draining or drained: availability holds one value, and writing cordoned over draining would erase a drain in flight while claiming its workloads were left alone. shc node undrain <node> stops the drain and leaves the node cordoned.

Undo with shc node uncordon <node>.

shc node cordon <node> [flags]
-h, --help help for cordon
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)
  • shc node - manage and inspect cluster nodes