What steps should be taken to replace and/or remove an agent node from a single-node cluster within Automation Suite?
Issue Description:
When attempting to remove an agent node from a single-node cluster using the Automation Suite command /configureUiPathAS.sh node remove --name "node_name", the operation fails, and an error is generated. This command is designed for use in multi-node clusters and not applicable for single-node environments.
Resolution: To properly remove an agent node from a single-node cluster within Automation Suite, follow these steps:
- Adding a New Agent Node (If Applicable):
- To replace an already existing agent node, begin by adding the new agent node to the cluster. Ensure it is fully operational before proceeding with the removal of the old node.
- Prepare Node for Removal:
- Cordon the Agent Node: Start by cordoning the agent node to prevent new pods from being scheduled on it. Use the command kubectl cordon .
- Drain the Agent Node: Next, drain the node to safely evict all pods. Use the command kubectl drain
- Delete the Node:
- Finally, once the node is cordoned and drained, use the command kubectl delete node to remove the agent node from the cluster.
Note: Replace with the actual name of your node. It is important to ensure that any persistent volumes (PVs) associated with the node are appropriately handled to prevent data loss.