none cleanup: force kubeadm, clear /etc/kubernetes, and use sudo for kubectl kill

pull/3415/head
Thomas Stromberg 2018-12-04 13:37:31 -08:00
parent 468182238c
commit 198c1724c7
2 changed files with 4 additions and 2 deletions

View File

@ -158,7 +158,7 @@ fi
if pgrep kubectl; then
echo "killing hung kubectl processes ..."
ps -afe | grep kubectl | grep -v grep || true
pgrep kubectl | xargs kill || true
pgrep kubectl | ${SUDO_PREFIX} xargs kill || true
fi
function cleanup_stale_routes() {

View File

@ -36,9 +36,11 @@ export KUBECONFIG="/root/.kube/config"
# "none" driver specific cleanup from previous runs.
# kubeadm
sudo kubeadm reset || true
sudo kubeadm reset -f || true
# Cleanup data directory
sudo rm -rf /data/*
# Cleanup old Kubernetes configs
sudo rm -rf /etc/kubernetes/*
# Stop any leftover kubelets
systemctl is-active --quiet kubelet \
&& echo "stopping kubelet" \