Skip to content

Instantly share code, notes, and snippets.

@alexnoz
Created July 13, 2023 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexnoz/debdd47b0acfc2a94d6b25959f2286ed to your computer and use it in GitHub Desktop.
Save alexnoz/debdd47b0acfc2a94d6b25959f2286ed to your computer and use it in GitHub Desktop.
#!/bin/bash
kubeadm reset -f
yum remove -y kube* containerd* docker* nginx cri*
rm -rf /etc/containerd /etc/cni/net.d /home/docker /var/log/nginx /home/cert-deploy /home/containerd /etc/ansible-iptables
iptables-save | awk '/^[*]/ { print $1 }
/^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }
/COMMIT/ { print $0; }' | iptables-restore
iptables-save > /etc/sysconfig/iptables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment