0 votes
in Kubernetes K8s by
How to do maintenance activity on the K8 node?

1 Answer

0 votes
by

Whenever there are security patches available the Kubernetes administrator has to perform the maintenance task to apply the security patch to the running container in order to prevent it from vulnerability, which is often an unavoidable part of the administration. The following two commands are useful to safely drain the K8s node.

kubectl cordon kubectl drain –ignore-daemon set The first command moves the node to maintenance mode or makes the node unavailable, followed by kubectl drain which will finally discard the pod from the node. After the drain command is a success you can perform maintenance.

Note: If you wish to perform maintenance on a single pod following two commands can be issued in order:

kubectl get nodes: to list all the nodes kubectl drain : drain a particular node

Related questions

0 votes
asked May 18, 2023 in Kubernetes K8s by sharadyadav1986
0 votes
0 votes
asked Sep 26, 2023 in Network Theory by Robin
...