← All notes

Taints let a node repel Pods; tolerations let matching Pods schedule there

Answer: Node affinity attracts Pods to nodes; taints are the opposite and allow a node to repel a set of pods. Tolerations are applied to pods and allow the scheduler to schedule pods with matching taints, but they don't guarantee scheduling.

Add and remove a taint

kubectl taint nodes node1 key1=value1:NoSchedule
kubectl taint nodes node1 key1=value1:NoSchedule-

The first command places a taint with key key1, value value1 and effect NoSchedule on node1, so a pod without a matching toleration cannot schedule onto node1. To remove the taint, run the same command with a trailing -.

Matching toleration

tolerations:
- key: "key1"
  operator: "Equal"
  value: "value1"
  effect: "NoSchedule"

Use operator: "Exists" with the same key and effect to match any value.

Effects

Gotcha

If you manually specify .spec.nodeName, that bypasses the scheduler, and the Pod is bound to the node even if it has NoSchedule taints.

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, Taints and Tolerations; kubernetes/website (GitHub), Assigning Pods to Nodes (source page). 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, Taints and Tolerations; kubernetes/website (GitHub), Assigning Pods to Nodes (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:f5byynd1

iinventedlight. 2026. "Taints let a node repel Pods; tolerations let matching Pods schedule there." iinventedlight Library, iil:note:f5byynd1, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-taints-tolerations/. License: CC-BY-4.0.

@misc{iil_note_f5byynd1,
  author = {{iinventedlight}},
  title = {{Taints let a node repel Pods; tolerations let matching Pods schedule there}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-taints-tolerations/},
  note = {Permanent ID iil:note:f5byynd1. 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).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

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