Nodes are the basic building blocks of a cluster that run application workloads. A node can be a virtual machine or a physical machine, depending on your business needs. Each node contains the components required to run pods, such as Kubelet, Kube-proxy, and a container runtime. You can manage nodes in the Container Service for Kubernetes (ACK) console.
This topic applies only to clusters created in the new version of ACK after August 15, 2020.
Set node scheduling
You can configure node scheduling in the console to distribute workloads across nodes.
Prerequisites
Disable scheduling
After you disable scheduling for a node, pods are no longer scheduled to that node during application deployments.
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
Select a node, choose More > Disable Scheduling, and then click OK in the dialog box that appears.
Return to the node list page. The node status is now unschedulable.
Resume scheduling
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
Select a node, choose More > Resume Scheduling, and then click OK in the dialog box that appears.
Return to the node list page and verify that the node status is Schedulable.
View node details
Prerequisites
Procedure
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
In the node list, click a node name to open the node details page. You can view the following information on the page.
Information Module
Details
Basic Information
Node server IP address
Node creation time
Scheduling Status:
Schedulable
Unschedulable
Machine Details: Click View to go to the Elastic Compute Service console. You can view detailed information about the node server, such as basic information, configuration, billing, and monitoring data.
Annotations: System annotation information.
System-defined node labels that can be used for node grouping.
Pod List
A list of pods on the node. The list includes the pod name, IP address, namespace, status, and creation time. Click a pod name to go to the pod details page.
Node Events
Event logs that reflect the node lifecycle and health status. The logs include the event name, count, reason, and content.
YAML
The YAML file of the node. You can copy the content with one click.
Manage labels
You can use the containerized application service to add and remove tags.
Procedure
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
Find the target node and in the Actions column, choose More > Edit Labels.
In the Edit Labels dialog box, add or remove labels as needed:
Add a label:
You can click Add a row of data below.
Enter a key and a value.
After you enter the information, click Submit.
Remove a label:
Find the label to remove and click Delete in the Actions column. The label is removed from the list.
Click Submit.
Manage taints
A taint marks a node to prevent certain pods from being scheduled onto it. You can apply one or more taints to each node.
Procedure
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
Find the target node and in the Actions column, choose More > Edit Taints.
In the Edit Taints dialog box, add or remove taints as needed:
Add a taint:
Click Add a Row of Data.
Enter a Key (required) and a Value (optional). For Effect, select NoSchedule, NoExecute, or PreferNoSchedule.
NoteWhen you add multiple taints, the keys must be unique. The values can be duplicates or empty.
After you finish the configuration, click Submit.
Remove a taint:
Find the taint to remove and click Delete in the Actions column. The taint is removed from the list.
Click Submit.
Monitor nodes
ACK clusters are integrated with Cloud Monitor. This lets you view monitoring metrics for Kubernetes nodes and their underlying ECS instances.
Basic resource monitoring in Cloud Monitor is enabled by default for ACK clusters. You can also view monitoring metrics for Kubernetes workloads in the Cloud Monitor console. For more information, see Basic resource monitoring.
Procedure
Log on to the ACK console. In the navigation pane on the left, click Cluster Management.
On the Cluster Details page, click the Nodes tab.
Find the target node and in the Actions column, choose More > Monitoring to go to the Cloud Monitor console.
You can view basic monitoring information for the corresponding ECS instance. The information includes metrics such as CPU utilization, inbound bandwidth, outbound bandwidth, system disk BPS, and system disk IOPS.
Delete nodes
If you no longer need a node, you can remove it.
Prerequisites
Precautions
Deleting a node causes pod migration, which may affect your services. Perform this operation during off-peak hours.
This operation is risky. We recommend that you back up your data before you proceed.
During this operation, the system marks the node as unschedulable.
You can remove only worker nodes, not master nodes.
We recommend that you remove nodes from the console. If you manually remove a node by running the
sudo kubectl delete nodecommand, note the following:The removed node cannot be added to other clusters.
If you delete the cluster later, the ECS instance that corresponds to the node is also released.
Procedure
In the navigation pane on the left, click Cluster Management to go to the cluster details page.
Click the Nodes tab, find the node to delete, and then in the Actions column, choose More > Delete.
In the Warning dialog box that appears, select a deletion option and click OK.
Automatically drain the node: This option moves the pods from the node to other nodes in the cluster. Make sure that other nodes in the cluster have sufficient resources. You can also run the
sudo kubectl drain node-namecommand locally to move the pods.NoteThe format of node-name is
your-region-name.node-id.your-region-nameis the region where your cluster is located.node-idis the ID of the ECS instance of the node. For example,cn-hangzhou.i-xxx.Release the ECS instance at the same time: This option immediately releases pay-as-you-go ECS instances. Subscription ECS instances are automatically released only after their subscription expires. To release a subscription instance sooner, you can perform one of the following operations:
Request a refund to release the instance in advance. For more information, see Refund rules and procedures.
Change the billing method to pay-as-you-go and then release the instance. For more information, see Change the billing method of an instance from subscription to pay-as-you-go.
NoteIf you do not select this option, the ECS instance that corresponds to the node continues to be billed.