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
kubectldrain removes a node from service after evicting pods.Thedrain can respect a PodDisruptionBudget you have defined.
See also
Claims
- id: C1 claim: kubectl drain removes a node from service after evicting pods. source: S1 evidence: "You can use kubectl drain to safely evict all of your pods from a node"
- id: C2 claim: The drain can respect a PodDisruptionBudget you have defined. source: S2 evidence: "optionally respecting the PodDisruptionBudget you have defined"
- id: C3 claim: uncordon allows the scheduler to place new pods on the node again. source: S2 evidence: "it can resume scheduling new pods onto the node"
Sources
- [S1] Safely Drain a Node. Kubernetes docs. https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] safely-drain-node.md. Kubernetes website. https://raw.githubusercontent.com/kubernetes/website/main/content/en/docs/tasks/administer-cluster/safely-drain-node.md . License: CC-BY-4.0. Accessed 2026-11-18.
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
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.},
}
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.