diff options
Diffstat (limited to 'tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-master.yml')
-rw-r--r-- | tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-master.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-master.yml b/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-master.yml new file mode 100644 index 00000000..f797ddb6 --- /dev/null +++ b/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-k8s-master.yml @@ -0,0 +1,22 @@ +--- +- name: Drain master node + command: kubectl drain {{ ansible_hostname }} --delete-local-data --force --ignore-daemonsets + +- name: Delete master node + command: kubectl delete node {{ ansible_hostname }} + +- name: Kubeadm reset (master) + shell: yes y | sudo kubeadm reset + +- name: Delete /etc/cni/net.d/ (master) + command: sudo rm -rf /etc/cni/net.d/ + +- name: Delete $HOME/.kube/ + file: + path: $HOME/.kube/ + state: absent + +- name: Delete init log file + file: + path: "{{ token_file }}" + state: absent
\ No newline at end of file |