How To Clean up Decommissioned Node Manually

Problem

Cleaning up the decommissioned node manually.

Environment

  • Platform9 Managed Kubernetes- All Versions

Procedure

  1. Stop the Platform9 Managed Kubernetes Stack:

~$ sudo systemctl stop pf9-hostagent pf9-nodeletd
~$ sudo /opt/pf9/nodelet/nodeletd phases stop
  1. Erase the pf9-hostagent package from node:

~$ sudo yum erase pf9-hostagent docker-ce* docker-ce-cli* containerd* -y
  1. If the stale directories exists, remove them by using the below command:

~$ sudo rm -rf /opt/pf9/ /etc/pf9/ /root/pf9 /usr/bin/pf9ctl /var/log/pf9 /opt/cni /etc/cni/ /opt/containerd /var/lib/kubelet/cpu_manager_state /var/opt/pf9 /etc/yum.repos.d/* /var/lib/docker/ /var/lib/containerd

Optionally, delete the temporary files in /tmp:

~$ cd /tmp && rm -rf docker-* hostagent* kube-scheduler-*
  1. Reboot the node to ensure there is no residual process.

Last updated