Cluster Node Shrinkage¶
When the peak business period is over, in order to save resource costs, you can reduce the size of the cluster and unload redundant nodes, that is, node scaling. After a node is uninstalled, applications cannot continue to run on the node.
Prerequisites¶
- The current operating user has the
Cluster Admin
role authorization. - Only through the container management module created cluster can node expansion and contraction be supported, and the cluster accessed from the outside does not support this operation.
- Before uninstalling a node, you need to pause scheduling the node, and expel the applications on the node to other nodes.
- Eviction method: log in to the controller node, and use the kubectl drain command to evict all Pods on the node. The safe eviction method allows the containers in the pod to terminate gracefully.
Precautions¶
-
When cluster nodes shrink, they can only be uninstalled one by one, not in batches.
-
If you need to uninstall cluster controller nodes, you need to ensure that the final number of controller nodes is an odd number.
-
The first controller node cannot be offline when the cluster node shrinks. If it is necessary to perform this operation, please contact the after-sales engineer.
Steps¶
-
On the Clusters page, click the name of the target cluster.
If the Cluster Type has the tag Integrate Cluster , it means that the cluster does not support node expansion and contraction.
-
Click Nodes on the left navigation bar, find the node to be uninstalled, click ⵗ and select Remove .
-
Enter the node name, and click Delete to confirm.