Cleaning up the bare metal server after a failed UCP Advisor installation

Unified Compute Platform (UCP) Advisor Software Installation Guide

Part Number

If UCP Advisor installation fails, and you do not have the Linux LVM snapshots, you must clean up the installation before attempting to reinstall UCP Advisor.

  1. Log on to the bare metal server as a root or sudo user.
  2. Run the following commands:
    kubeadm reset -f
    systemctl stop kubelet
    systemctl disable kubelet
    systemctl disable docker --now
    yum remove kubeadm docker kubectl kubelet -y
    yum remove kubeadm kubectl kubelet -y
    yum remove kubernetes-cni -y 
    rm -f /usr/bin/docker
    rm -rf $HOME/.kube/config
    iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
    rm -rf /etc/cni /etc/kubernetes /var/lib/dockershim /var/lib/etcd /var/lib/kubelet /var/run/kubernetes ~/.kube/*
    ctr image del `ctr image list | awk '{print $1}'`
    yum remove containerd -y
    ip link delete cni0
    ip link delete flannel.1
    rm -rf /etc/kubernetes/manifests  
    rm -rf /var/ucpadvisor/*
    rm -rf /mnt/nfs_share
    rm -rf /var/openebs
  3. Reinstall UCP Advisor. See Installing the UCP Advisor software on a bare metal server.