October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How Kubernetes Taints and Tolerations Work

Kubernetes taints repel Pods from Nodes, while matching tolerations permit them through. Learn how effects control scheduling and eviction—and why tolerating a taint does not guarantee placement.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Kubernetes taints and tolerations control which Pods may use a Node: a taint repels Pods that lack a matching toleration, while a toleration permits a Pod to pass that taint. Permission is not placement, however—the scheduler still checks resources, affinity, topology, and other constraints.

What are taints and tolerations?

A taint is attached to a Node and consists of a key, an optional value, and an effect. A toleration is declared in a Pod specification and describes which taint it can tolerate. The Node API reference documents the taint fields; the Kubernetes taints and tolerations guide explains how they affect scheduling and eviction.

As an Amazon Associate I earn from qualifying purchases.

Think of taints as a filter, not a destination selector. Kubernetes considers a Node’s taints and ignores the ones matched by the Pod’s tolerations. The effects of any unmatched taints still apply. A Pod can tolerate one taint and remain unable to schedule because another taint repels it—or because a different scheduling requirement is unmet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What do the three taint effects do?

The effect determines whether a taint affects new placement, Pods already running on the Node, or both.

Effect New scheduler placement Pods already on the Node
NoSchedule Blocks placement of Pods that do not tolerate the taint. Not evicted by this effect.
PreferNoSchedule The scheduler tries to avoid placement of non-tolerating Pods, but may still place them. No eviction behavior is specified by this effect.
NoExecute Blocks placement of Pods that do not tolerate the taint. Non-tolerating Pods are evicted; a matching toleration can delay eviction.

These distinctions describe taint behavior, not a promise that a tolerating Pod will run. Scheduling still depends on the rest of the Pod’s requirements and cluster state.

How does Kubernetes match a toleration?

A toleration can match a taint by key, value, operator, and, when specified, effect. The guide’s two main matching patterns are:

  • Equal matches a key and value. For example, a toleration with key dedicated, value batch, and operator Equal matches a taint with those same key and value.
  • Exists matches a key regardless of its value. It can be used when the Pod should tolerate a taint for that key without requiring a particular value.

If a toleration specifies an effect, that effect must match as well. If it omits the effect, it can match taints with that key and operator regardless of effect. Check all taints on the candidate Node: a single unmatched NoSchedule taint is enough to reject ordinary scheduler placement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you add a taint or toleration?

Add a taint to a Node

The kubectl taint form is key=value:effect. For example, to mark a Node for batch workloads:

kubectl taint nodes node1 dedicated=batch:NoSchedule

This taint prevents scheduler placement of Pods that lack a matching toleration. To remove that taint, append a minus sign to its key/effect form:

kubectl taint nodes node1 dedicated=batch:NoSchedule-

Add a matching toleration to a Pod template

For a workload managed by a controller, add the toleration under the Pod template’s spec. This example permits matching the taint above:

spec:
  template:
    spec:
      tolerations:
      - key: "dedicated"
        operator: "Equal"
        value: "batch"
        effect: "NoSchedule"

Apply the updated workload configuration using your normal deployment process. The toleration permits the Pod to be considered for the Node; it does not select that Node. Use node affinity or another placement rule if the workload should prefer or require a particular set of Nodes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How long does a Pod stay with a NoExecute taint?

A matching NoExecute toleration without tolerationSeconds lets a Pod remain on the Node without a time limit from that taint. With tolerationSeconds, the value is the number of seconds the Pod can remain after the taint is added. If the taint is removed before that duration elapses, the Pod is not evicted for that taint.

For example, to tolerate a matching taint for 3,600 seconds:

tolerations:
- key: "maintenance"
  operator: "Equal"
  value: "planned"
  effect: "NoExecute"
  tolerationSeconds: 3600

The duration is not a guarantee that a Pod will remain for the full interval if another event or constraint causes it to stop running.

Why can a Pod stay Pending even though it tolerates a taint?

A toleration removes only the obstacle created by a taint it matches. The scheduler can still reject a Node for other reasons, including insufficient resources, node affinity or selector rules, topology constraints, or another unmatched taint. Tolerations also do not attract a Pod to a Node; they merely allow it past matching taints.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Confirm the Pod’s toleration matches the taint’s key, value, operator, and effect.
  • Inspect all taints on candidate Nodes, not just the one you expected the Pod to tolerate.
  • Check the Pod’s resource requests and its affinity, selectors, and topology requirements.
  • Distinguish scheduler placement from direct binding: setting .spec.nodeName bypasses the scheduler, so a Pod may bind despite a NoSchedule taint. A NoExecute taint can still cause the kubelet to evict a Pod without an appropriate toleration.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do Node health taints affect Pods?

The control plane communicates certain Node conditions to scheduling through taints; the scheduler checks taints rather than evaluating Node conditions directly. For example, disk pressure maps to node.kubernetes.io/disk-pressure, and memory pressure maps to node.kubernetes.io/memory-pressure. The official guide also documents automatic tolerations for some workloads: Pods outside the BestEffort QoS class automatically tolerate memory-pressure taints, and DaemonSet Pods receive several automatic tolerations.

The guide documents 300-second automatic tolerations for the not-ready and unreachable taints unless configured otherwise. DaemonSet Pods have indefinite NoExecute tolerations for those taints. These defaults affect how Pods respond to taints; they do not make an unhealthy Node suitable for every workload.

For Kubernetes versions after 1.29, the guide says taint-based eviction moved from the node controller to the separate taint-eviction-controller. The controller can be disabled with --controllers=-taint-eviction-controller in kube-controller-manager. Because this is version-sensitive control-plane behavior, verify it against the documentation for your cluster release before changing controller settings.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.