Free nodes are nodes that are not added to node pools. Free nodes exist in clusters that were created before the node pool feature is released. After you add free nodes to a node pool, you can use the node pool to manage the nodes. This topic describes how to add free nodes to a node pool.
Step 1: Create and scale a node pool
Before you add free nodes to a node pool, you must create and scale out a node pool. Make sure that the maximum number of nodes supported by the node pool equals the number of free nodes that you want to add and the node pool uses the same node configuration as the free nodes.
- Log on to the ACK console and click Clusters in the left-side navigation pane.
- On the Clusters page, click the name of a cluster and choose in the left-side navigation pane.
- In the upper-right corner of the Node Pools page, click Create Node Pool.
- In the Create Node Pool dialog box, configure the node pool and click Confirm Order. Note
- For more information, see Manage node pools.
- For more information about how to scale out a node pool, see Scale a node pool.
- For more information about how to add existing nodes to a node pool, see Add existing ECS instances to an ACK cluster.
Step 2: Remove free nodes from the cluster
- On the Clusters page, click the name of a cluster and choose in the left-side navigation pane.
- On the Nodes page, find a free node that you want to remove and choose Actions column. in the Note To remove multiple nodes at a time, select the nodes that you want to remove on the Nodes page and click Batch Remove.
- In the Remove Node dialog box, select Drain the Node and Release ECS Instance. Read the notes and select I understand the above information and want to remove the node(s). Then, click OK.
- Release ECS Instance:
- Only pay-as-you-go ECS instances are released. Subscription ECS instances are not released. The system continues to bill ECS instances that are not released.
- Subscription ECS instances are automatically released after the subscription expires.
- If you do not select Release ECS Instance, you are still charged for the ECS instance where the node is deployed.
- Drain the Node: Select this option to migrate pods that run on the nodes to other nodes in the cluster. Make sure that the nodes that you added in Step 1: Create and scale a node pool can provide sufficient resources to host these pods. You can also run the
kubectl drain node-name [options]
command to migrate pods that run on the nodes to be removed to other nodes in the cluster.Note- node-name must be in the format of your-region-name.node-id.
your-region-name specifies the region where the cluster that you want to manage is deployed. node-id specifies the ID of the ECS instance where the node to be removed is deployed. Example: cn-hangzhou.i-xxx.
options
specifies the optional parameters of the command. Example:--force --ignore-daemonsets --delete-local-data
. You can run thekubectl drain --help
command to view help information.
- node-name must be in the format of your-region-name.node-id.
- Release ECS Instance: