When no data disk is attached to a node in a Container Service for Kubernetes (ACK) cluster, node data such as the downloaded images, container runtime, temporary container data, and stdout are stored on the system disk. This consumes a large amount of the storage space on the system disk. Consequently, the stability of the node may be compromised. To address this issue, we recommend that you attach data disks to nodes when you create node pools. If no data disk is attached to a node when it is created, you can also attach data disks to the node after it is created.
You can attach data disks to nodes when you create a node pool. To attach data disks to existing nodes, you can create a new node pool to replace the node pool to which the nodes belong. After you attach a data disk to a node, ACK automatically mounts the directories of the kubelet and container runtime to the data disk during node initialization.
Attach data disks when you create nodes
Log on to the ACK console. Go to the Node Pools page and click Create Node Pool. In the Create Node Pool dialog box, add disks in the Mount Data Disk section. For more information about node pool parameters, see Create a node pool.
Attach data disks to existing nodes
Log on to the ACK console and create a new node pool. For more information about node pool parameters, see Create a node pool.
Data Disk: Add data disks to be mounted.
Expected Nodes: You can specify the same number of nodes as the node pool to which the existing nodes belong.
On the Nodes page, select the existing nodes that you want to manage and click Drain in the lower part of the page. Read the information in the Drain dialog box and click OK to drain the nodes at the same time. ACK sets the nodes to unschedulable and migrates the applications from the original node pool to the new node pool.
On the Node Pools page, find the node pool to which the existing nodes belong and perform the following operations in the Actions column to delete the node pool. For more information about how to delete a node pool and the relevant considerations, see Delete a node pool.
Click Scale and set the Expected Nodes parameter to 0.
Choose
> Delete to delete the node pool.