Manually uninstalling Cloudera Embedded Container Service from a cluster

You can manually uninstall Cloudera Embedded Container Service from your cluster.

Before performing this procedure, ensure that you have activated the Cloudera Embedded Container Service parcel on the cluster hosts.

During the installation time of Cloudera Embedded Container Service, the directory for Longhorn and the LSO are decided by Cloudera Manager and defaults to /ecs.

  1. On each host in the cluster:
    1. /opt/cloudera/parcels/ECS/docker/docker container stop registry
    2. /opt/cloudera/parcels/ECS/docker/docker container rm -v registry
    3. /opt/cloudera/parcels/ECS/docker/docker image rm registry:2.8.3
  2. Stop the Cloudera Embedded Container Service cluster in Cloudera Manager.
  3. On each host:
    1. cd /opt/cloudera/parcels/ECS/bin
    2. ./rke2-killall.sh # usually 2 times is sufficient
    3. Use umount to unmount all NFS disks.
    4. ./rke2-uninstall.sh
    5. rm -rf /ecs/* # assumes the default defaultDataPath and lsoDataPath
    6. rm -rf /var/lib/docker_server/* # deletes the auth and certs
    7. rm -rf /etc/docker/certs.d/* # delete the ca.crt
    8. rm -rf /docker # assumes the default defaultDataPath for docker
    9. rm -rf /var/lib/rancher/*
  4. Delete the Cloudera Embedded Container Service cluster in Cloudera Manager.
    1. In Cloudera Manager, navigate to Cloudera Data Services on premises and click . Click Delete.


    2. The Delete Cluster wizard appears. Click Delete.


  5. Clean IPtables on each host:
    echo "Reset iptables to ACCEPT all, then flush and delete all other chains";
                            declare -A chains=( [filter]=INPUT:FORWARD:OUTPUT [raw]=PREROUTING:OUTPUT [mangle]=PREROUTING:INPUT:FORWARD:OUTPUT:POSTROUTING [security]=INPUT:FORWARD:OUTPUT [nat]=PREROUTING:INPUT:OUTPUT:POSTROUTING );
                            for table in "${!chains[@]}"; do 
                            echo "${chains[$table]}" | tr : $"\n" | while IFS= read -r;
                            do sudo iptables -t "$table" -P "$REPLY" ACCEPT
                            done
                            sudo iptables -t "$table" -F
                            sudo iptables -t "$table" -X
                            done
                        
  6. Reboot the host(s).
  7. Before you install Cloudera Embedded Container Service again, ensure that the IP tables list is empty by executing the following command: #iptables -L