Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.25] Remove pod-manifests dir in killall script #4928

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions bundle/bin/rke2-killall.sh
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