Skip to content

Commit

Permalink
Remove pod-manifests dir in killall script (#4929)
Browse files Browse the repository at this point in the history
* remove pod-manifests dir in killall script

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* remove pod-manifests dir in killall script

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* remove pod-manifests dir in killall script

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
  • Loading branch information
galal-hussein committed Oct 19, 2023
1 parent 13bc384 commit 0d0d0e4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bundle/bin/rke2-killall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ fi

rm -rf /var/lib/cni/ /var/log/pods/ /var/log/containers

# Remove pod-manifests files for rke2 components
POD_MANIFESTS_DIR=/var/lib/rancher/rke2/agent/pod-manifests

rm -f ${POD_MANIFESTS_DIR}/etcd.yaml \
${POD_MANIFESTS_DIR}/kube-apiserver.yaml \
${POD_MANIFESTS_DIR}/kube-controller-manager.yaml \
${POD_MANIFESTS_DIR}/cloud-controller-manager.yaml\
${POD_MANIFESTS_DIR}/kube-scheduler.yaml \
${POD_MANIFESTS_DIR}/kube-proxy.yaml

# 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
Expand Down

0 comments on commit 0d0d0e4

Please sign in to comment.