mirror of https://github.com/k3s-io/k3s
Update util.sh
When we deploy the kubernetes using Ubuntu's script. 1. First we set the roles "ai i i" and NUM_MINIONS=3, it runs as expected. 2. Then we change the roles to "a i i" and NUM_MINIONS=2, we found it will not run successfully. It's because there are history files left on the previous deployment. This commit will delete the files when stop the cluster.pull/6/head
parent
a101aa175d
commit
bb28684f43
|
@ -437,6 +437,8 @@ function kube-down {
|
|||
{
|
||||
echo "Cleaning on node ${i#*@}"
|
||||
ssh -t $i 'pgrep etcd && sudo -p "[sudo] password for cleaning etcd data: " service etcd stop && sudo rm -rf /infra*'
|
||||
# Delete the files in order to generate a clean environment, so you can change each node's role at next deployment.
|
||||
ssh -t $i 'rm -f /opt/bin/kube* /etc/init/kube* /etc/init.d/kube* /etc/default/kube*; rm -rf ~/kube'
|
||||
}
|
||||
done
|
||||
wait
|
||||
|
|
Loading…
Reference in New Issue