Skip to content

Instantly share code, notes, and snippets.

@Qquanwei
Last active August 7, 2019 04:30
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 Qquanwei/7b28aefb05972abc841471863a064b29 to your computer and use it in GitHub Desktop.
Save Qquanwei/7b28aefb05972abc841471863a064b29 to your computer and use it in GitHub Desktop.
docker rm -f $(sudo docker ps -aq);
docker volume rm $(sudo docker volume ls -q);
rm -rf /etc/ceph \
/etc/cni \
/etc/kubernetes \
/opt/cni \
/opt/rke \
/run/secrets/kubernetes.io \
/run/calico \
/run/flannel \
/var/lib/calico \
/var/lib/etcd \
/var/lib/cni \
/var/lib/kubelet \
/var/lib/rancher/rke/log \
/var/log/containers \
/var/log/pods \
/var/run/calico
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
rm -f /var/lib/containerd/io.containerd.metadata.v1.bolt/meta.db
sudo systemctl restart containerd
sudo systemctl restart docker
IPTABLES="/sbin/iptables"
cat /proc/net/ip_tables_names | while read table; do
$IPTABLES -t $table -L -n | while read c chain rest; do
if test "X$c" = "XChain" ; then
$IPTABLES -t $table -F $chain
fi
done
$IPTABLES -t $table -X
done
#!/usr/bin/bash
wget https://github.com/rancher/rke/releases/download/v0.2.6/rke_linux-amd64
nodes:
- address: 192.168.77.129
internal_address: 192.168.77.129
user: quanwei
role: [controlplane,worker,etcd]
services:
etcd:
snapshot: true
creation: 6h
retention: 24h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment