Change:
This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: Flag --delete-local-data has been deprecated, This option is deprecated and will be deleted. Use --delete-emptydir-data. I don’t know if it’s a good time to update this flag . If so, I can help update it. Proposed Solution: Update to Page to Update: <!--Optional Information (remove the comment tags around information you would like to include)--<!--Kubernetes Version:--<!--Additional Information:--/sig cluster-lifecycle
cc
i see the discussion / PR here: using in the kubeadm docs makes sense. /triage accepted /help
This request has been marked as needing help from a contributor. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : Flag --delete-local-data has been deprecated, This option is deprecated and will be deleted. Use --delete-emptydir-data. I don’t know if it’s a good time to update this flag . If so, I can help update it. /help </details
/assign

Discussion:
Talking to the control-plane node with the appropriate credentials, run: ```bash <del> kubectl drain <node name> --delete-local-data --force --ignore-daemonsets </del> <ins> kubectl drain <node name> --delete-emptydir-data --force --ignore-daemonsets </ins> ``` Before removing the node, reset the state installed by `kubeadm`:

**only do this in a test cluster**. ```shell <del> kubectl drain <node-name> --force --delete-local-data --ignore-daemonsets </del> <ins> kubectl drain <node-name> --force --delete-emptydir-data --ignore-daemonsets </ins> ``` Now you can watch as the Pod reschedules on a different Node:

drain the node on which the `zk-0` Pod is scheduled. ```shell <del> kubectl drain $(kubectl get pod zk-0 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-local-data </del> <ins> kubectl drain $(kubectl get pod zk-0 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data </ins> ``` ```

`zk-1` is scheduled. ```shell <del> kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-local-data "kubernetes-node-ixsl" cordoned </del> <ins> kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data "kubernetes-node-ixsl" cordoned </ins> ``` ```

`zk-2` is scheduled. ```shell <del> kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-local-data </del> <ins> kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data </ins> ``` ```

Attempt to drain the node on which `zk-2` is scheduled. ```shell <del> kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-local-data </del> <ins> kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data </ins> ``` The output: