in Education 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 <node name>: drain a particular node

Related questions

0 votes
    How do we control the resource usage of POD?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    Which of these is not a Service Spec? (1)ClusterIP (2)PodIP (3)ExternalName (4)NodePort...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    Kubernetes Architectutre consists of ______ (1)Master and Slave (2)Server and Client (3)Master and Node (4)All of the these...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    Kubernetes cluster must contain only one Master? (1)False (2)True...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    What are the various things that can be done to increase Kubernetes security?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    What is the role of Load Balance in Kubernetes?...
asked Jul 15, 2021 in Education by JackTerrance
0 votes
    9)Disk space is a computer maintenance utility included in Microsoft windows designed to free up disk space on a ... true or false Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    Yes, the dreaded 'M' word. You've got a workstation, source control and half a million lines of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    I'm making some changes to a legacy classic ASP application. I've made the changes locally, and now ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 9, 2022 in Education by JackTerrance
0 votes
    What are different methods of session maintenance in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    __________ provides a snapshot of threats over time, encouraging the maintenance of up-to-date ... monitoring Threat analysis Vulnerability Scanning Endpoint activity monitoring...
asked Oct 25, 2020 in Technology by JackTerrance
0 votes
    I am trying to use change tracking to copy data incrementally from a SQL Server to an Azure SQL Database. I ... change tracking table? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    What do you mean by activity and selectivity of catalysts ? Select the correct answer from above options...
asked Jan 3, 2022 in Education by JackTerrance
0 votes
    I'm used to v3 node botbuilder sdk so I have a middleware where I look at the dialog stack and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
...