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
NoSchedule: new pods without a matching toleration are not scheduled onto the node.PreferNoSchedule: a "preference" or "soft" version of NoSchedule.NoExecute: also affects pods already running on the node; pods that do not tolerate it are evicted. A toleration can settolerationSecondsto dictate how long the pod stays bound after the taint is added.
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
- id: C1 claim: Taints allow a node to repel a set of pods. source: S1 evidence: "they allow a node to repel a set of pods"
- id: C2 claim: Tolerations allow scheduling but do not guarantee it. source: S1 evidence: "Tolerations allow scheduling but don't guarantee scheduling"
- id: C3 claim: Setting nodeName bypasses the scheduler. source: S1 evidence: "that action bypasses the scheduler"
- id: C4 claim: Node taints can repel Pods from specific nodes. source: S2 evidence: "to repel Pods from specific nodes"
Sources
- [S1] Taints and Tolerations. Kubernetes docs. https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] Assigning Pods to Nodes (source page). kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/scheduling-eviction/assign-pod-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, 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
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.},
}
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.
- kubernetes-taints-tolerations.table.json (table; CC-BY-4.0)
- kubernetes-taints-tolerations.schema.json (schema; CC-BY-4.0)
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.