CloudNatix logo

CloudNatix CLI

cnatix k8s drain run

Runs a new node drain.

Synopsis

Runs a new node drain.

When one or more node names are specified as arguments, it drains those nodes. The --node-label-selector flag can also be used to specify nodes to drain. This flag cannot be combined with node arguments.

cnatix k8s drain run [node]... [flags]

Options

      --cluster string                        Name of the cluster
      --color string                          Control color output. Available options are 'auto', 'always' and 'never'. (default "auto")
      --dry-run                               Run a new node drain in dry-run mode.
      --evict-bare-pod                        Continue even if there are pods that are not managed by a replication controller.
      --evict-daemonsets-lastly               Evict DaemonSets pods after the other pods are evicted.
      --evict-daemonsets-pod                  Continue even if there are pods replicated by DaemonSets.
      --evict-pod-with-empty-dir              Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).
      --evict-pod-with-no-pdb                 Continue even if pod does not have a PDB resource.
      --evict-pod-with-strict-pdb             Continue even if pod has a PDB with DisruptionsAllowed < 1. Such Pods make eviction stuck and require manual handling.
      --grace-period-seconds int              Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used. (default -1)
  -h, --help                                  help for run
      --interactive                           Interactively run drain command. (default true)
      --max-concurrent-node-evictions int32   Maximum number of concurrent node evictions. Zero means evicting pods on all nodes at the same time. (default 1)
      --max-grace-period-seconds int          Cap the grace-period-seconds and Pod's terminationGracePeriodSeconds. Negative value means not to set the upper limit. (default -1)
      --node-label-selector string            Label selector to filter nodes (This flag cannot be combined with node arguments).
      --pod-deletion-timeout duration         Period of timeout to wait for the pod to be deleted, zero means infinite and minimum unit is seconds.
      --pod-label-selector string             Label selector to filter pods on the node

Options inherited from parent commands

      --global-controller-domain string   Domain name of the CloudNatix Global Controller
      --workspace string                  workspace directory (default is $HOME/.cnatix)

SEE ALSO

Next
Getting Started