Permanently removing a Cloudera Embedded Container Service host
You can permanently remove a Cloudera Embedded Container Service host.
- On the host detail page in Cloudera Manager, click Actions → Stop Roles on Host.
- On the host detail page, select the ECS role and click Delete.
- On the same page, select the Docker role and click Delete.
-
Step 4 (On-host cleanup)
- Log in to the host as root (or using
sudo -i) and run the following sequence:rke2-killall.shis not fully idempotent whencontainerd-shimchildren respawn — running it twice is normally sufficient.cd /opt/cloudera/parcels/ECS/bin./rke2-killall.sh # usually 2 times is sufficient ./rke2-killall.sh - 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 -
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 anyrm -rfreportsDevice or resource busy, re-run./rke2-killall.shand check for surviving processes:ps -ef | grep -E 'containerd-shim|kubelet|rke2' | grep -v grep
- Log in to the host as root (or using
-
Navigate to Cloudera Manager → Hosts → All
Hosts, select the host, and choose Actions for
Selected → Remove From Cloudera Manager.
Review the following notes:
rke2-uninstall.shcleans 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.shunmounts bind mounts under the kubelet root but does not touch NFS mounts. Skip the explicitumountand the uninstaller can hang on stale NFS handles.- If the host used a non-default
defaultDataPathorlsoDataPath, replace/ecs/*and/dockerin 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.
