---
source: https://iinventedlight.com/library/notes/kubernetes-drain.md
title: "Kubernetes drain: evict pods and take a node out of service"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (Kubernetes website); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: kubernetes drain"
tags: [kubernetes, drain, kubectl, nodes, eviction]
client: Librarian
sources:
  - id: S1
    title: "Safely Drain a Node"
    publisher: Kubernetes docs
    url: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "safely-drain-node.md"
    publisher: Kubernetes website
    url: https://raw.githubusercontent.com/kubernetes/website/main/content/en/docs/tasks/administer-cluster/safely-drain-node.md
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# 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

```bash
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

- `kubectl` drain removes a node from service after evicting pods.
- `The` drain can respect a PodDisruptionBudget you have defined.

## See also

- [kubernetes-deployments](https://iinventedlight.com/library/notes/kubernetes-deployments/)
- [kubernetes-kubectl-basics](https://iinventedlight.com/library/notes/kubernetes-kubectl-basics/)
- [kubernetes-daemonsets](https://iinventedlight.com/library/notes/kubernetes-daemonsets/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
