From 7bb8787a78bb222bce85a3596c6e30778107c022 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Fri, 20 Jan 2023 23:20:10 +0000 Subject: [PATCH] Remove pod logs as part of killall Also, don't double-print the echoed informational message Signed-off-by: Brad Davidson (cherry picked from commit ffa8d1f646b6f89e54d49605102516a900569009) --- bundle/bin/rke2-killall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundle/bin/rke2-killall.sh b/bundle/bin/rke2-killall.sh index cef7e02ff3..d4dcb8fb5c 100755 --- a/bundle/bin/rke2-killall.sh +++ b/bundle/bin/rke2-killall.sh @@ -88,11 +88,14 @@ if [ -d /sys/class/net/nodelocaldns ]; then ip link delete nodelocaldns fi -rm -rf /var/lib/cni/ +rm -rf /var/lib/cni/ /var/log/pods/ /var/log/containers # Delete iptables created by CNI plugins or Kubernetes (kube-proxy) iptables-save | grep -v KUBE- | grep -v CNI- | grep -v cali- | grep -v cali: | grep -v CILIUM_ | grep -v flannel | iptables-restore ip6tables-save | grep -v KUBE- | grep -v CNI- | grep -v cali- | grep -v cali: | grep -v CILIUM_ | grep -v flannel | ip6tables-restore + +set +x + echo 'If this cluster was upgraded from an older release of the Canal CNI, you may need to manually remove some flannel iptables rules:' echo -e '\texport cluster_cidr=YOUR-CLUSTER-CIDR' echo -e '\tiptables -D POSTROUTING -s $cluster_cidr -j MASQUERADE --random-fully'