kubectl drain <Node>

Drain node in preparation for maintenance

Arguments

NameDescription
Node

Options

NameDescription
--dry-run <Strategy>Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource
-l, --selector <arg>Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--delete-local-dataContinue even if there are pods using emptyDir (local data that will be deleted when the node is drained)
--disable-evictionForce drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, use with caution
--forceContinue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet
--grace-period <INT (Seconds)>Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used
--ignore-daemonsetsIgnore DaemonSet-managed pods
--pod-selector <arg>Label selector to filter pods on the node
--skip-wait-for-delete-timeout <arg>If pod DeletionTimestamp older than N seconds, skip waiting for the pod. Seconds must be greater than 0 to skip
--timeout <INT (Seconds)>The length of time to wait before giving up, zero means infinite