aboutsummaryrefslogtreecommitdiffstats
path: root/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-workers-drain.yml
blob: 46ae50ec6ef4d5b5dc0d0d9f3552e7f6c74ba90d (plain)
1
2
3
4
5
6
7
8
---
- name: Drain worker node
  delegate_to: "{{ groups['master'][0] }}"
  command: kubectl drain {{ ansible_hostname }} --delete-local-data --force --ignore-daemonsets

- name: Delete worker node
  delegate_to: "{{ groups['master'][0] }}"
  command: kubectl delete node {{ ansible_hostname }}