Last active
August 13, 2024 07:31
-
-
Save superseb/2cf186726807a012af59a027cb41270d to your computer and use it in GitHub Desktop.
Cleanup host added as custom to Rancher 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# OUTDATED: please refer to the link below for the latest version: | |
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
Thanks !
ros should have a clean function. Or reinstall from cloud-config...
Will this unregister the node from the cluster too ?
saved me a bunch of time, tyvm!
Are you shure it's /var/run/calico
and not /var/lib/calico
?
@HoffmannP This gist is outdated, I updated the code with a link to the updated version.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When installing rancher-agent on the same host for testing purposes the cluster would not run properly until I also removed all data from
/opt/rancher
, perhaps it was only one of the three dirs: