diff --git a/admin_guide/manage_nodes.adoc b/admin_guide/manage_nodes.adoc index 9962256b93e0..61814a27acc7 100644 --- a/admin_guide/manage_nodes.adoc +++ b/admin_guide/manage_nodes.adoc @@ -241,31 +241,49 @@ controller] can be evacuated; the replication controllers create new pods on other nodes and remove the existing pods from the specified node(s). Bare pods, meaning those not backed by a replication controller, are unaffected by default. -To list pods that will be migrated without actually performing the evacuation, -use the `--dry-run` option: +To evacuate one or more nodes: ---- -$ oc adm manage-node \ - --evacuate --dry-run [--pod-selector=] +$ oc adm drain ---- -To actually evacuate all or selected pods on one or more nodes: +You can force deletion of bare pods by using the `--force` option. When set to +`true`, deletion continues even if there are pods not managed by a replication +controller, ReplicaSet, job, daemonset, or StatefulSet: ---- -$ oc adm manage-node \ - --evacuate [--pod-selector=] +$ oc adm drain --force=true ---- -You can force deletion of bare pods by using the `--force` option: +You can use `--grace-period` to set a period of time in seconds for each pod to +terminate gracefully. If negative, the default value specified in the pod will +be used: ---- -$ oc adm manage-node \ - --evacuate --force [--pod-selector=] +$ oc adm drain --grace-period=-1 ---- -Alternatively, instead of specifying specific node names (e.g., ` -`), you can use the `--selector=` option to evacuate pods -on selected nodes. +You can use `--ignore-daemonsets` and set it to `true` to ignore +daemonset-managed pods: + +---- +$ oc adm drain --ignore-daemonset=true +---- + +You can use `--timeout` to set the length of time to wait before giving up. A +value of `0` sets an infinite length of time: + +---- +$ oc adm drain --timeout=5s +---- + +You can use `--delete-local-data` and set it to `true` to continue deletion even +if there are pods using emptyDir (local data that will be deleted when the node +is drained): + +---- +$ oc adm drain --delete-local-data=true +---- [[rebooting-nodes]] == Rebooting Nodes