Skip to content

Instantly share code, notes, and snippets.

@gbarre
Created February 8, 2021 13:55
Show Gist options
  • Save gbarre/fdcebb0a54810cc72d178d8abbfa73cc to your computer and use it in GitHub Desktop.
Save gbarre/fdcebb0a54810cc72d178d8abbfa73cc to your computer and use it in GitHub Desktop.
Removes all traces of kubernetes on a node
#!/bin/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"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment