Node Management
This tutorial demonstrates what a cluster administrator can view and do for nodes within a cluster.
You need a user granted a role including the authorization of Cluster Management. For example, you can log in to the console as directly or create a new role with the authorization and assign it to a user.
Cluster nodes are only accessible to cluster administrators. Some node metrics are very important to clusters. Therefore, it is the administrator’s responsibility to watch over these numbers and make sure nodes are available. Follow the steps below to view node status.
Click Platform in the upper-left corner and select Cluster Management.
Choose Cluster Nodes under Nodes, where you can see detailed information of node status.
- Name: The node name and subnet IP address.
- Status: The current status of a node, indicating whether a node is available or not.
- Role: The role of a node, indicating whether a node is a worker or master.
- CPU Usage: The real-time CPU usage of a node.
- Pods: The real-time usage of Pods on a node.
- Allocated CPU: This metric is calculated based on the total CPU requests of Pods on a node. It represents the amount of CPU reserved for workloads on this node, even if workloads are using fewer CPU resources. This figure is vital to the Kubernetes scheduler (kube-scheduler), which favors nodes with lower allocated CPU resources when scheduling a Pod in most cases. For more details, refer to Managing Resources for Containers.
- Allocated Memory: This metric is calculated based on the total memory requests of Pods on a node. It represents the amount of memory reserved for workloads on this node, even if workloads are using fewer memory resources.
Note
CPU and Allocated CPU are different most times, so are Memory and Allocated Memory, which is normal. As a cluster administrator, you need to focus on both metrics instead of just one. It’s always a good practice to set resource requests and limits for each node to match their real usage. Over-allocating resources can lead to low cluster utilization, while under-allocating may result in high pressure on a cluster, leaving the cluster unhealthy.
Click a node from the list and you can go to its detail page.
Labels: Node labels can be very useful when you want to assign Pods to specific nodes. Label a node first (for example, label GPU nodes with
node-role.kubernetes.io/gpu-node
), and then add the label in Advanced Settings so that you can allow Pods to run on GPU nodes explicitly. To add node labels, click More and select Edit Labels.