Uninstallation
According to the platform installation method, uninstallation methods vary. The methods are as follows.
Ocboot Installation
Ocboot quick installation means installing a K3s or Kubernetes cluster on the server in an All in One manner, and then deploying Cloudpods in the cluster.
Therefore, uninstalling Cloudpods only requires uninstalling the installed K3s or Kubernetes cluster, and related packages installed on the server.
- K3s
- Kubernetes
卸载 K3s 服务
$ k3s-uninstall.sh
$ k3s-agent-uninstall.sh
停止并禁用相关服务:
$ systemctl disable --now yunion-executor
卸载Kubernetes服务
$ kubeadm reset --force
$ ipvsadm --clear
停止并禁用相关服务:
$ systemctl disable --now docker.socket docker kubelet yunion-executor
卸载kubelet, yunion-executor等包,并清除相关的数据目录,下面以 centos 举例:
$ rpm -qa |grep kube |xargs -I {} yum -y remove {}
$ rpm -qa |grep yunion |xargs -I {} yum -y remove {}
$ rm -rf /etc/kubernetes/ /var/lib/etcd/ /root/.kube/ /opt/cloud/
Uninstall database (using CentOS as an example):
$ yum -y remove mariadb*
$ rm -rf /var/lib/mysql # To preserve original data, execute mv -f /var/lib/mysql /var/lib/mysql.$(date +"%Y%m%d-%H%M").bak
$ rm -rf /etc/my.conf
Reboot the machine to restore the previous network:
$ reboot
Uninstall openvswitch (reboot first, then uninstall openvswitch to avoid possible network disconnection). The command is as follows:
$ systemctl disable --now openvswitch
$ yum -y remove openvswitch-*
$ rm -rf /etc/openvswitch
Kubernetes Helm Installation
Use the following command to uninstall:
helm uninstall -n onecloud default
Docker Compose Installation
Use the following command to uninstall:
docker compose down