Available in VPC
You can view the list of worker nodes in a cluster and manage each worker node. If a graceful termination is needed, you can use the kubectl command to safely evict pods from a worker node.
View the list of worker nodes
To view the list of worker nodes in a cluster:
- From the VPC environment on the NAVER Cloud Platform console, navigate to
> Services > Containers > Ncloud Kubernetes Service. - Click the individual cluster row from the list of clusters.
- In the cluster details tab, click [View worker node] under the node pools area.
- To view lists of other clusters' nodes, click on the cluster names.
- The status of a normal node is shown as Ready. The status of nodes with malfunctioning Kubelet or nodes that don't function properly for other reasons is shown as Not Ready.
- Another way to view this list in the VPC environment on the console is to navigate to
> Services > Containers > Ncloud Kubernetes Service > Nodes.
View worker node details
To view the details for each worker node in a cluster, click the name of the node you want to see from the list of worker nodes.
Worker node maintenance through Kubectl
If an intervention is needed for stable service operation, use Kubectl to safely evict pods from a worker node, and then end the containers within the pod through graceful termination.
Check worker node status
Run the command shown below to check the worker node status.
$ kubectl --kubeconfig $KUBE_CONFIG describe node $NODENAME
Below is an example of a node in a normal state.
"conditions": [
{
"type": "Ready",
"status": "True",
"reason": "KubeletReady",
"message": "kubelet is posting ready status",
"lastHeartbeatTime": "2019-06-05T18:38:35Z",
"lastTransitionTime": "2019-06-05T11:41:27Z"
}
]
- The node's status is returned as a JSON object.
- If the status value among the node conditions maintains the Unknown or False state for at least 5 minutes, all the pods on the node are scheduled to be deleted by the node controller.
(In the Ncloud Kubernetes Service on the NAVER Cloud Platform, pod-eviction-timeout is set to 5 minutes.)
Evict pods from worker nodes
To safely evict pods from a node before performing various tasks, such as node kernel update, infrastructure maintenance, etc., use the kubectl drain command. Safely evicted pod containers can be ended through graceful termination.
Certain system pods in a node can't be removed with the kubectl drain command.
For more information about undeletable pods, see kubectl drain.
To evict pods from a worker node using the kubectl drain command:
- To check the node from which you want to evict pods, run the command shown below.
$ kubectl --kubeconfig $KUBE_CONFIG get nodes
- Among the nodes shown, enter the name of the target worker node you want to evict pods from, and then run the command shown below.
$ kubectl --kubeconfig $KUBE_CONFIG drain $NODENAME
- After performing cluster maintenance, use the command below to re-enable pod scheduling on the worker node.
$ kubectl --kubeconfig $KUBE_CONFIG uncordon $NODENAME