Forked from superseb/extended-cleanup-rancher2.sh
Last active
November 7, 2019 18:47
-
-
Save mattmattox/5914440f4c29fbbb598818a72b553600 to your computer and use it in GitHub Desktop.
Revisions
-
mattmattox revised this gist
Nov 7, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ if [ "$1" = "flush" ]; then iptables -X -t mangle iptables -F iptables -X /etc/init.d/docker restart || systemctl restart docker else echo "Parameter flush not found, iptables not cleaned" fi -
superseb revised this gist
Jun 20, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ #!/bin/sh # Backup your data # Use at your own risk # Usage ./extended-cleanup-rancher2.sh # Include clearing all iptables: ./extended-cleanup-rancher2.sh flush docker rm -f $(docker ps -qa) docker rmi -f $(docker images -q) docker volume rm $(docker volume ls -q) -
superseb revised this gist
Jun 20, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ #!/bin/sh # Backup your data # Use at your own risk docker rm -f $(docker ps -qa) docker rmi -f $(docker images -q) docker volume rm $(docker volume ls -q) -
superseb revised this gist
Jun 20, 2019 . No changes.There are no files selected for viewing
-
superseb revised this gist
Sep 14, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ docker rm -f $(docker ps -qa) docker rmi -f $(docker images -q) docker volume rm $(docker volume ls -q) for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico" for dir in $cleanupdirs; do echo "Removing $dir" rm -rf $dir -
superseb revised this gist
Jul 11, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,7 @@ if [ "$1" = "flush" ]; then iptables -X -t mangle iptables -F iptables -X /etc/init.d/docker restart else echo "Parameter flush not found, iptables not cleaned" fi -
superseb revised this gist
Jul 10, 2018 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,15 @@ cleanupinterfaces="flannel.1 cni0 tunl0" for interface in $cleanupinterfaces; do echo "Deleting $interface" ip link delete $interface done if [ "$1" = "flush" ]; then echo "Parameter flush found, flushing all iptables" iptables -F -t nat iptables -X -t nat iptables -F -t mangle iptables -X -t mangle iptables -F iptables -X else echo "Parameter flush not found, iptables not cleaned" fi -
superseb created this gist
Jul 10, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/sh docker rm -f $(docker ps -qa) docker rmi -f $(docker images -q) docker volume rm $(docker volume ls -q) for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher /var/log/containers /var/log/pods /var/run/calico" for dir in $cleanupdirs; do echo "Removing $dir" rm -rf $dir done cleanupinterfaces="flannel.1 cni0 tunl0" for interface in $cleanupinterfaces; do echo "Deleting $interface" ip link delete $interface done