File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
content/en/docs/tasks/administer-cluster Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,16 @@ kubectl get nodes
66
66
Next, tell Kubernetes to drain the node:
67
67
68
68
``` shell
69
- kubectl drain < node name>
69
+ kubectl drain --ignore-daemonsets < node name>
70
70
```
71
71
72
+ If there are pods managed by a DaemonSet, you will need to specify
73
+ ` --ignore-daemonsets ` with ` kubectl ` to successfully drain the node. The ` kubectl drain ` subcommand on its own does not actually drain
74
+ a node of its DaemonSet pods:
75
+ the DaemonSet controller (part of the control plane) immediately replaces missing Pods with
76
+ new equivalent Pods. The DaemonSet controller also creates Pods that ignore unschedulable
77
+ taints, which allows the new Pods to launch onto a node that you are draining.
78
+
72
79
Once it returns (without giving an error), you can power down the node
73
80
(or equivalently, if on a cloud platform, delete the virtual machine backing the node).
74
81
If you leave the node in the cluster during the maintenance operation, you need to run
You can’t perform that action at this time.
0 commit comments