From b0352f079c2663d9b8bdbef7fca29c8259cb9c80 Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Thu, 19 Oct 2023 20:41:21 +0300 Subject: [PATCH] remove pod-manifests dir in killall script Signed-off-by: galal-hussein --- bundle/bin/rke2-killall.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundle/bin/rke2-killall.sh b/bundle/bin/rke2-killall.sh index ac5784b488..111034c050 100755 --- a/bundle/bin/rke2-killall.sh +++ b/bundle/bin/rke2-killall.sh @@ -89,7 +89,8 @@ if [ -d /sys/class/net/nodelocaldns ]; then ip link delete nodelocaldns fi -rm -rf /var/lib/cni/ /var/log/pods/ /var/log/containers /var/lib/rancher/rke2/agent/pod-manifests +rm -rf /var/lib/cni/ /var/log/pods/ /var/log/containers +grep -rl "tier: control-plane" /var/lib/rancher/rke2/agent/pod-manifests/ | while read MANIFEST; do rm -f $MANIFEST; done # 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