delete&reset
DOK supports decommissioning Kubernetes nodes and resetting node configuration and files.
delete
mainly refers to the removal of Kubernetes nodes. The main logic is as follows:
# Isolate node, evict all containers
kubectl drain --force --delete-local-data --ignore-daemonsets --grace-period=10 $node
# delete node
kubectl delete node $node
Reset mainly refers to the cleaning of nodes. The current solution of reset is relatively violent. The main logic is as follows:
- Cleanup process
- Cleanup Disk
- Cleanup the network
- Delete configuration