github.com/alibaba/sealer@v0.8.6-0.20220430115802-37a2bdaa8173/docs/site/src/zh/help/faq.md (about)

     1  # FAQ
     2  
     3  This section is mean to answer the most frequently asked questions about sealer. And it will be updated regularly.
     4  
     5  ## How to clean host environment manually when sealer apply failed.
     6  
     7  in some case ,when you failed to run sealer apply ,and the hints show a little that is not enough to use, this section
     8  will guild you how to clean your host manually.
     9  
    10  you may follow the below clean steps when run kubeadm init failed.
    11  
    12  ### umount rootfs or apply mount if it existed
    13  
    14  ```shell
    15  df -h | grep sealer
    16  overlay          40G  7.3G   31G  20% /var/lib/sealer/data/my-cluster/rootfs
    17  ```
    18  
    19  umount examples:
    20  
    21  ```shell
    22  umount /var/lib/sealer/data/my-cluster/rootfs
    23  ```
    24  
    25  ## delete rootfs directory if it existed
    26  
    27  ```shell
    28  rm -rf /var/lib/sealer/data/my-cluster
    29  ```
    30  
    31  ## delete kubernetes directory if it existed
    32  
    33  ```shell
    34  rm -rf /etc/kubernetes
    35  rm -rf /etc/cni
    36  rm -rf /opt/cni
    37  ```
    38  
    39  ## delete docker registry if it existed
    40  
    41  ```shell
    42  docker ps
    43  docker rm -f -v sealer-registry
    44  ```
    45  
    46  you may follow the below clean steps if your cluster is up.
    47  
    48  ## kubeadm reset
    49  
    50  ```shell
    51  kubeadm reset -f
    52  ```
    53  
    54  ## delete kube config and kubelet if it existed
    55  
    56  ```shell
    57  rm -rf $HOME/.kube/config
    58  rm -rf ~/.kube/ && rm -rf /etc/kubernetes/ && \
    59  rm -rf /etc/systemd/system/kubelet.service.d && rm -rf /etc/systemd/system/kubelet.service && \
    60  rm -rf /usr/bin/kube* && rm -rf /usr/bin/crictl && \
    61  rm -rf /etc/cni && rm -rf /opt/cni && \
    62  rm -rf /var/lib/etcd && rm -rf /var/etcd
    63  ```