基于二进制安装方式的 Containerd 卸载

删除 containerd 命令及配置:

1
2
rm -rf /usr/local/bin/
rm -rf /etc/containerd/

服务:

1
2
3
4
crm -rf /usr/local/lib/systemd/system/containerd.service

rm -rf /usr/local/sbin/runc
rm -rf /opt/cni/bin/

清理 docker0 等网络

1
2
3
4
5
6
7
yum -y install bridge-utils
ifconfig docker0 down
brctl delbr docker0

ip link del flannel.1
ip link del kube-ipvs0
ip link del dummy0
  • 清理所有 docker 运行镜像
1
docker ps -a|awk '{print $1}'|grep -v  CONTAINER|xargs docker rm -f
  • 清理所有 docker images
1
docker images|awk '{print $3}'|grep -v  IMAGE|sort|uniq|xargs docker rmi -f

每个 node 下删除网络配置文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# flannel
ifconfig flannel.1 down
ip link delete flannel.1
# calico
ifconfig vxlan.calico down
ip link delete vxlan.calico
# canal
ifconfig tunl0 down
ip link delete tunl0
rm -rf /var/lib/cni/
rm -f /etc/cni/net.d/*
Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up