Merge "Dropping draining node while removing k8s cluster."
This commit is contained in:
commit
f70ffd8c3f
@ -176,10 +176,6 @@ function get_k8s_token {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function kubeadm_reset {
|
function kubeadm_reset {
|
||||||
local nodename
|
|
||||||
nodename=$(kubectl get nodes -o jsonpath="{.items[0].metadata.name}")
|
|
||||||
kubectl drain $nodename --delete-emptydir-data --force --ignore-daemonsets
|
|
||||||
kubectl delete node $nodename
|
|
||||||
sudo kubeadm reset -f
|
sudo kubeadm reset -f
|
||||||
sudo iptables -F
|
sudo iptables -F
|
||||||
sudo iptables -t nat -F
|
sudo iptables -t nat -F
|
||||||
|
@ -155,13 +155,10 @@ if is_service_enabled kuryr-kubernetes kuryr-daemon \
|
|||||||
if [[ "$1" == "unstack" ]]; then
|
if [[ "$1" == "unstack" ]]; then
|
||||||
# Shut down kuryr and kubernetes services
|
# Shut down kuryr and kubernetes services
|
||||||
if is_service_enabled kuryr-kubernetes; then
|
if is_service_enabled kuryr-kubernetes; then
|
||||||
if [ "${KURYR_CONT}" == "True" ]; then
|
if [ "${KURYR_CONT}" == "False" ]; then
|
||||||
kubectl delete deployment kuryr-controller
|
|
||||||
else
|
|
||||||
stop_process kuryr-kubernetes
|
stop_process kuryr-kubernetes
|
||||||
stop_process kuryr-daemon
|
stop_process kuryr-daemon
|
||||||
fi
|
fi
|
||||||
#sudo systemctl stop kubelet
|
|
||||||
kubeadm_reset
|
kubeadm_reset
|
||||||
fi
|
fi
|
||||||
cleanup_kuryr_devstack_iptables
|
cleanup_kuryr_devstack_iptables
|
||||||
|
Loading…
Reference in New Issue
Block a user