Resetting a Node
Scenario
You can reset a node to modify the node configuration, such as the node OS and login mode.
Resetting a node will reinstall the node OS and the Kubernetes software on the node. If a node is unavailable because you modify the node configuration, you can reset the node to rectify the fault.
Notes and Constraints
- For CCE clusters, the version must be v1.13 or later to support node resetting.
- For Kunpeng clusters, the version must be v1.15 or later to support node resetting.
Notes
- Only worker nodes can be reset. If the node is still unavailable after the resetting, delete the node and purchase a new one.
- Resetting a node will reinstall the node OS and interrupt workload services running on the node. Therefore, perform this operation during off-peak hours.
- Data in the system disk and Docker data disks will be cleared. Back up important data before resetting the node.
- When an extra data disk is mounted to a node, data in this disk will be cleared if the disk has not been unmounted before the node reset. To prevent data loss, back up data in advance and mount the data disk again after the node reset is complete.
- The IP addresses of the workload pods on the node will change, but the container network access is not affected.
- There is remaining EVS disk quota.
- While the node is being deleted, the backend will set the node to the unschedulable state.
Procedure
- Log in to the CCE console. In the navigation pane, choose Resource Management > Nodes. In the same row as the node you will reset, choose More > Reset. Figure 1 Resetting a node
- In the dialog box displayed, enter RESET and reconfigure the password or key pair for login. Figure 2 Node resetting dialog box
- Click Yes and wait until the node is reset.
After the node is reset, pods on it are automatically migrated to other available nodes.
Procedure (New UI)
The new console allows you to reset nodes in batches. You can also use private images to reset nodes in batches.
- Log in to the CCE console.
- Click the cluster name to open its details page, choose Nodes on the left, and select one or multiple nodes to be reset in the list on the right. Choose More > Reset. Figure 3 Resetting the selected node
- In the displayed dialog box, click Yes.
- For nodes in the DefaultPool node pool, the parameter setting page is displayed. Set the parameters by referring to 4.
- For a node you create in a node pool, resetting the node does not support parameter configuration. You can directly use the configuration image of the node pool to reset the node.
- Configure parameters.
Container Engine
This parameter is available only for CCE Turbo clusters. You can select Docker or containerd. For details about their differences, see Secure Containers and Common Containers.
OS
- Public image: Select an OS for the node.
A public image is a standard, widely used image. It contains an OS and preinstalled public applications and is available to all users. For more information, see Overview.
- Private image (OBT): A private image contains an OS or service data, preinstalled public applications, and the owner's private applications. It is available only to the user who created it. Private images are supported only for clusters of v1.15 or later.
If no private image is available, create one by following the instructions provided in Using a Private Image to Build a Worker Node Image (OBT).
Login Mode
- Password: The default username is root. Enter the password for logging in to the node and confirm the password.
Remember the password as you will need it when you log in to the node.
- Key pair: Select the key pair used to log in to the node. You can select a shared key.
A key pair is used for identity authentication when you remotely log in to a node. If no key pair is available, click Create a key pair. For details on how to create a key pair, see Creating a Key Pair.
Storage configuration
Configure the node data disk.
Advanced Settings
- Kubernetes Label: Kubernetes provides labels for you to run kubectl commands to filter node resources by label.
- Resource Tags: Resource tags can be added to classify resources.
You can create predefined tags in Tag Management Service (TMS). Predefined tags are visible to all service resources that support the tagging function. You can use these tags to improve tagging and resource migration efficiency. For details, see Creating Predefined Tags.
CCE will automatically create the "CCE-Dynamic-Provisioning-Node=Node ID" tag. A maximum of 8 tags can be added.
- Taints: Taints allow a node to repel a set of pods and work with tolerations to ensure that pods are not scheduled onto inappropriate nodes. For details, see Configuring Node Scheduling (Tainting).
- Max. Pods: maximum number of pods that can be created on a node, corresponding to the maxPods configuration item in kubelet. This number is also decided by other parameters. For details, see Maximum Number of Pods That Can Be Created on a Node.
- Pre-installation Script: Enter a maximum of 1,000 characters.
The script will be executed before Kubernetes software is installed. Note that if the script is incorrect, Kubernetes software may fail to be installed. It is commonly used to format data disks.
- Post-installation Script: Enter a maximum of 1,000 characters.
The script will be executed after Kubernetes software is installed and will not affect the installation. It is commonly used to modify Docker parameters.
- Public image: Select an OS for the node.
- Click Next: Confirm.
- Click Submit.
Last Article: Configuring Node Scheduling (Tainting)
Next Article: Deleting a Node
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.