← All notes

Kubernetes drain: evict pods and take a node out of service

Answer: kubectl drain evicts the pods on a node so you can take that node out of service safely. The drain can optionally respect the PodDisruptionBudget you have defined. After that work, run kubectl uncordon so Kubernetes can resume scheduling new pods onto the node.

Examples

kubectl drain mynode --ignore-daemonsets
kubectl uncordon mynode

Notes

Use kubectl drain to remove a node from service. DaemonSet pods are treated differently from other evictions. uncordon tells Kubernetes that it can resume scheduling new pods onto the node.

Reference list

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Safely Drain a Node; Kubernetes website, safely-drain-node.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Safely Drain a Node; Kubernetes website, safely-drain-node.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:y98ptfvs

iinventedlight. 2026. "Kubernetes drain: evict pods and take a node out of service." iinventedlight Library, iil:note:y98ptfvs, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-drain/. License: CC-BY-4.0.

@misc{iil_note_y98ptfvs,
  author = {{iinventedlight}},
  title = {{Kubernetes drain: evict pods and take a node out of service}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-drain/},
  note = {Permanent ID iil:note:y98ptfvs. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-drain.md.