Stop deleting DaemonSet pods during drain.
We do this because they will be recreated immediately by the DaemonSet Controller. In addition, we also require a specific flag (--ignore-daemonsets) when there are DaemonSet pods on the node.
This commit is contained in:
@@ -38,9 +38,12 @@ Drain node in preparation for maintenance.
|
||||
|
||||
The given node will be marked unschedulable to prevent new pods from arriving.
|
||||
Then drain deletes all pods except mirror pods (which cannot be deleted through
|
||||
the API server). If there are any pods that are neither mirror pods nor
|
||||
managed by a ReplicationController, Job, or DaemonSet, then drain will not
|
||||
delete any pods unless you use --force.
|
||||
the API server). If there are DaemonSet-managed pods, drain will not proceed
|
||||
without --ignore-daemonsets, and regardless it will not delete any
|
||||
DaemonSet-managed pods, because those pods would be immediately replaced by the
|
||||
DaemonSet controller, which ignores unschedulable marknigs. If there are any
|
||||
pods that are neither mirror pods nor managed--by ReplicationController,
|
||||
DaemonSet or Job--, then drain will not delete any pods unless you use --force.
|
||||
|
||||
When you are ready to put the node back into service, use kubectl uncordon, which
|
||||
will make the node schedulable again.
|
||||
@@ -66,6 +69,7 @@ $ kubectl drain foo --grace-period=900
|
||||
```
|
||||
--force[=false]: Continue even if there are pods not managed by a ReplicationController, Job, or DaemonSet.
|
||||
--grace-period=-1: 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-daemonsets[=false]: Ignore DaemonSet-managed pods.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
@@ -100,7 +104,7 @@ $ kubectl drain foo --grace-period=900
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 28-Jan-2016
|
||||
###### Auto generated by spf13/cobra on 2-Feb-2016
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user