Permanently removing a Cloudera Embedded Container Service host

You can permanently remove a Cloudera Embedded Container Service host.

  1. On the host detail page in Cloudera Manager, click Actions → Stop Roles on Host.
  2. On the host detail page, select the ECS role and click Delete.
  3. On the same page, select the Docker role and click Delete.
  4. Step 4 (On-host cleanup)
    1. Log in to the host as root (or using sudo -i) and run the following sequence: rke2-killall.sh is not fully idempotent when containerd-shim children respawn — running it twice is normally sufficient.cd /opt/cloudera/parcels/ECS/bin

      ./rke2-killall.sh # usually 2 times is sufficient ./rke2-killall.sh

    2. Unmount all NFS mounts on the host before running the uninstaller — the RKE2 uninstaller does not unmount NFS:
      # List NFS mounts, then umount each 
      mount -t nfs,nfs4 
      umount -a -t nfs,nfs4
    3. Run the uninstaller and clear Cloudera Embedded Container Service-specific data directories:

      ./rke2-uninstall.sh
      rm -rf /ecs/*                     # assumes the default defaultDataPath and lsoDataPath
      rm -rf /var/lib/docker_server/*   # deletes the auth and certs
      rm -rf /etc/docker/certs.d/*      # deletes the ca.crt
      rm -rf /docker                    # assumes the default defaultDataPath for docker
      rm -rf /var/lib/rancher/*
      If any rm -rf reports Device or resource busy, re-run ./rke2-killall.sh and check for surviving processes:
      ps -ef | grep -E 'containerd-shim|kubelet|rke2' | grep -v grep
  5. Navigate to Cloudera ManagerHosts → All Hosts, select the host, and choose Actions for Selected → Remove From Cloudera Manager.
    Review the following notes:
    • rke2-uninstall.sh cleans only /var/lib/rancher/rke2, /etc/rancher/rke2, /etc/rancher/node, /etc/cni, /opt/cni/bin, and /var/lib/kubelet. Every other path in Step d (On-host cleanup) must be removed manually or the host will retain stale Cloudera Embedded Container Service state on re-add.
    • rke2-killall.sh unmounts bind mounts under the kubelet root but does not touch NFS mounts. Skip the explicit umount and the uninstaller can hang on stale NFS handles.
    • If the host used a non-default defaultDataPath or lsoDataPath, replace /ecs/* and /docker in the cleanup with the configured paths from Cloudera Manager. The values are visible under the Cloudera Embedded Container Service service configuration.
    Rollback options:
    • Recommission: If the host still misbehaves after End Maintenance, place it back into maintenance mode from the same Actions menu. No data is lost.
    • Permanent removal: Rollback is not possible once Step 4 (On-host cleanup) is initiated. Restoring the host to the cluster requires the standard Cloudera Embedded Container Service add-host workflow — parcel re-install, ECS/Docker role assignment, and Longhorn re-onboarding of the new node.