/plushcap/analysis/cast-ai/cast-ai-kubernetes-cordon-how-it-works-and-when-to-use-it

Kubernetes Cordon: How It Works And When To Use It

What's this blog post about?

Kubernetes cordon is an operation that marks or taints a node as unschedulable, preventing the Kubernetes scheduler from placing new pods onto that node. This can be useful for maintenance tasks such as replacing hardware components, updating the node's kernel, or resizing compute resources. To use Kubernetes cordon, simply run the command "kubectl cordon $NODENAME". After cordoning a node, you may also drain it to remove existing pods and ensure no new ones are scheduled on that node. The process of draining involves evicting running pods so they can be rescheduled to other nodes in your cluster. Kubernetes cordon and drain prepare your application for node downtime by letting workloads get rescheduled to other nodes, allowing you to safely shut down the target node without impacting service availability.

Company
Cast AI

Date published
May 10, 2023

Author(s)
Laurent Gil

Word count
1023

Language
English

Hacker News points
46


By Matt Makai. 2021-2024.