7 echo "--------------------------------------------------------"
10 node_name=$(kubectl get node |awk '{print $1}' |grep -v NAME) ||true
13 kubectl drain $i --delete-local-data --force --ignore-daemonsets
14 kubectl delete node $i
17 if [[ "$NODE_NAME" =~ "huawei-eliot-pod1" ]]; then
18 sshpass -f /home/jenkins/pwfile.txt ssh root@10.10.0.99 sudo kubeadm reset -f ||true
19 sshpass -f /home/jenkins/pwfile.txt ssh root@10.10.1.15 sudo kubeadm reset -f ||true
20 elif [[ "$NODE_NAME" =~ "huawei-eliot-centos-pod3" ]]; then
21 sshpass -f /home/jenkins/pwfile.txt ssh root@10.10.0.211 sudo kubeadm reset -f ||true
22 sshpass -f /home/jenkins/pwfile.txt ssh root@10.10.0.138 sudo kubeadm reset -f ||true
27 echo "--------------------------------------------------------"