注意:

    此操作不可逆,如有需要请做好备份操作。此删除方式将会删除部署的所有组件。避免其他因素导致卸载不干净,建议先把应用全部停止完成。管理节点卸载可能会导致计算节点不可用。

    以下卸载仅面向管理节点和计算节点复用情况,其他情况类似

    1. # 计算节点需要下线后操作删除
    2. grclis stop
    3. systemctl disable docker
    4. systemctl disable etcd
    5. systemctl disable node
    6. systemctl disable calico
    7. systemctl disable salt-master
    8. systemctl disable salt-minion
    9. systemctl disable kube-apiserver
    10. systemctl disable kube-controller-manager
    11. systemctl disable kube-scheduler
    12. systemctl disable kubelet
    13. cd /etc/systemd/system/
    14. systemctl disable rbd-*
    15. cclear
    16. systemctl stop docker
    17. systemctl stop salt-master
    18. systemctl stop salt-minion
    19. yum remove -y gr-docker*
    20. yum remove -y salt-*
    21. rm -rf /etc/systemd/system/kube-*
    22. rm -rf /etc/systemd/system/rbd-*
    23. rm -rf /etc/systemd/system/kubelet*
    24. rm -rf /etc/systemd/system/node.service
    25. rm -rf /etc/systemd/system/etcd.service
    26. rm -rf /etc/systemd/system/calico.service
    27. rm -rf /usr/lib/systemd/system/docker.service
    28. rm -rf /opt/rainbond
    29. rm -rf /cache
    30. rm -rf /grdata/
    31. rm -rf /etc/goodrain/
    32. rm -rf /srv/
    33. rm -rf /etc/salt/*
    34. cat > /etc/hosts <<EOF
    35. 127.0.0.1 localhost
    36. EOF
    37. # /usr/local/bin/
    38. 可以根据需求删除:calicoctl ctop dc-compose docker-compose domain-cli etcdctl grcert grctl kubectl kubelet node scope yq