Podを別ノードへ退避
-
--ignore-daemonsets
- Ignore DaemonSet-managed pods.
- DaemonSetが管理しているPodは無視することで、別のノードで起動し直す
-
--delete-local-data
- -Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).
- enmptyDirオプションでPod内にファイルがあった場合それが失われてしまう
kubectl drain <node> --delete-local-data --ignore-daemonsets
ノードを確認
-
Ready,SchedulingDisabled
となっていれば、停止可能
kubectl get nodes
ノードを復帰
kubectl uncordon <node>