How to Drain a Node in Kubernetes

In this Kubernetes tutorial you will learn to drain a node using kubectl drain command to prepare for maintenance.

It is as simple as entering this command.

You can get the nodes details using kubectl get nodes command.

But there is more to draining nodes in Kubernetes so let8217s take a detailed look at it.

Kubernetes is designed to be fault tolerant of worker node failures. .

There might be different reasons a worker node becomes unusable such as because of a hardware problem a cloud provider problem or if there are network issues between worker and master node the Kubernetes master handles it effectively. .

But that doesnt mean it will always be the case. And this is when you need to drain the nodes and remove all the pods.

The draining is the process for safely evicting all the pods from a node. This way the containers running on the pod terminate gracefully.

...

Read Full Post

News Link: https://linuxhandbook.com/kubectl-drain-node/.
RSS Link: https://linuxhandbook.com/feed/.

Linux Chatter is a news aggregator service that curates some of the best Linux, Cloud, Technical Guides, Hardware and Security news. We display just enough content from the original post to spark your interest. If you like the topic, then click on the 'read full post' button to visit the author's website. Use Linux Chatter to find content from amazing authors!

Note: The content provided has been modified and is not displayed as intended by the author. Any trademarks, copyrights and rights remain with the source.

Disclaimer: Linux Chatter sources content from RSS feeds and personal content submissions. The views and opinions expressed in these articles are those of the authors and do not necessarily reflect those of Linux Chatter.