Updated on 2024-06-26 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.

Notes and Constraints

  • The VM nodes that are being used by CCE cannot be deleted or unsubscribed from on the ECS console.
  • For a cluster of v1.17.11 or later, after a bare metal server is unsubscribed from or deleted on the BMS console, the corresponding node in the cluster is automatically deleted.
  • Deleting a node will cause PVC/PV data loss for the local PVs 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.

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.
  • While the node is being deleted, the backend will set the node to the unschedulable state.
  • Only worker nodes can be deleted.
  • 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.
  • If your yearly/monthly resources are not renewed upon expiration or your pay-per-use resources are in arrears, these resources will enter the grace period and then retention period. If you renew the resources during the grace period, the resources will not be affected. The resources during the retention period will be frozen. For details, see What Is a Grace Period of Huawei Cloud?What Is a Retention Period of Huawei Cloud?

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.