Help Center/ Cloud Container Engine/ User Guide/ Nodes/ Management Nodes/ Deleting or Unsubscribing from a Node
Updated on 2024-11-12 GMT+08:00

Deleting or Unsubscribing from a Node

Scenario

You can delete a pay-per-use node or unsubscribe from a yearly/monthly-billed node that is not needed from the node list.

Deleting or unsubscribing from a node in a CCE cluster will release the node and services running on the node. Drain the node and back up data before the deletion or unsubscription to prevent services running on the node from being affected.

Precautions

  • Deleting a node will lead to pod migration, which may affect services. Perform this operation during off-peak hours. It is a good practice to drain the node before deletion. For details, see Draining a Node.
  • Unexpected risks may occur during the operation. Back up data beforehand.
  • It takes about 5 to 10 minutes to unsubscribe from a yearly/monthly node. During this period, the node will be unavailable. After that, the node will be automatically cleared.
  • Deleting a node will cause PVC/PV data loss for the local PV associated with the node. These PVCs and PVs cannot be restored or used again. In this scenario, the pod that uses the local PV is evicted from the node. A new pod is created and stays in the pending state. This is because the PVC used by the pod has a node label, due to which the pod cannot be scheduled.

Deleting a Pay-per-Use Node

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane, choose Nodes. On the displayed page, click the Nodes tab.
  3. Locate the target node and choose More > Delete in the Operation column.
  4. In the Delete Node dialog box, enter DELETE and click Yes.

    • After the node is deleted, workload pods on the node are automatically migrated to other available nodes.
    • If the disks and EIPs bound to the node are important resources, unbind them first. Otherwise, they will be deleted with the node.

Unsubscribing from a Yearly/Monthly Node

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane, choose Nodes. On the displayed page, click the Nodes tab.
  3. Locate the target node and choose More > Unsubscribe in the Operation column. In the displayed dialog box, drain the node.

    After a node is selected for draining, CCE sets the node to be unschedulable so that no new pods can be scheduled to this node and then safely evicts all the pods meeting node draining requirements from the node. The time required for draining depends on the pods on the node. If it takes an excessively long time, go back to the node list and check events.

  4. After you confirm the unsubscription, the order page will be displayed. Confirm the unsubscription type and order amount.

    • It takes about 5 to 10 minutes to process the unsubscription. During this period, the node will be unavailable.
    • When a yearly/monthly node is unsubscribed from, the node is automatically labeled with node.cce.io/unsubscribe: true.