Kubernetes Taints and Tolerations: Dedicated Nodes Without Chaos
Kubernetes taints and tolerations reserve nodes for the workloads that belong there. This guide covers the three taint effects, toleration matching, dedicated GPU, spot and system pools, DaemonSet coverage, and NoExecute eviction timing, with valid YAML and a troubleshooting matrix.
Introduction
Kubernetes taints and tolerations let a node refuse Pods that do not belong on it. A taint marks the node, a toleration on the Pod grants an exception, and the scheduler enforces the pair. Used well, they keep expensive or fragile node pools dedicated without hand placing every workload.
Consider an illustrative composite drawn from common platform reviews, not a named incident. A team adds a small pool of GPU nodes for inference jobs and labels the nodes so the inference Deployment can find them. The label works, and the inference Pods land correctly. Within a week, the same nodes also run CI runners, a log shipper test, and two batch jobs that happened to fit. Nothing is broken, every Pod is healthy, and the GPU nodes are busy doing work that never needed a GPU. When an inference rollout starts, its Pods sit Pending because the capacity they were bought for is occupied by workloads that could run anywhere.
The fix in that composite was not a stronger label. Labels attract, and attraction does nothing to stop an unrelated Pod from scheduling onto the same node. The team needed the node to refuse work by default. That refusal is a taint, and the exception for the inference Pods is a toleration. Once the pool was tainted, only Pods that explicitly tolerated the taint could land there, and the capacity argument ended.
This is lesson 15 of the Kubernetes Roadmap Series, in Module 7 on scheduling, taints and placement. The previous lesson, Kubernetes scheduling with nodeSelector, affinity and anti-affinity, covered attraction: how a Pod asks for a kind of node. This lesson covers the opposite direction, repulsion, and the two combine into a complete placement policy. The next lesson moves on to spread and preemption, listed under Module 7 of the Kubernetes roadmap. If the wider scheduling picture is new to you, Kubernetes architecture and workload orchestration sets the scene.
The 5-minute takeaway
A taint lives on a node and repels Pods. A toleration lives on a Pod and cancels one matching taint for that Pod. NoSchedule blocks new Pods, PreferNoSchedule asks the scheduler to avoid the node, and NoExecute also evicts running Pods, with tolerationSeconds controlling how long a tolerant Pod may stay. A toleration only permits scheduling; it never attracts a Pod, so dedicated pools pair a taint with a label and node affinity. Set pool taints where the pool is defined, give DaemonSets the tolerations they need, and audit broad tolerations the way you audit broad permissions.
1. Kubernetes taints and tolerations: repulsion, not attraction
Kubernetes taints and tolerations push Pods away from a node, while affinity pulls Pods toward one. That direction difference is the whole design. Affinity is a Pod saying where it wants to run. A taint is a node saying which Pods may not run there unless they carry a matching exception.
The previous lesson dealt with attraction. nodeSelector and node affinity let a Pod declare that it needs nodes with certain labels, such as a zone, an architecture, or a GPU model. Attraction answers the question "where should this Pod go?" It does not answer "what else may run here?" A node with a gpu=true label will happily accept a Pod that never asked about GPUs, as long as resources fit. The label is information for Pods that care. It is not a fence.
A taint is the fence. When you taint a node, the scheduler treats that node as closed to every Pod except those carrying a matching toleration. The default flips: instead of every Pod being welcome until resources run out, only Pods that explicitly opt in are welcome. That default is what dedicated nodes need. Expensive hardware, licensed software, strict tenancy, and fragile system roles all share the same requirement: exclusion first, exceptions by name.
Tolerations alone still do not place anything. A Pod that tolerates a GPU taint can schedule on the GPU node, but it can also schedule on any ordinary node, because tolerating a taint removes a barrier rather than adding a preference. This is the most common half-finished setup in production clusters: the taint is correct, the toleration is correct, and the workload still lands on general nodes because nothing told it to prefer the dedicated pool. The complete pattern is three parts working together. The label names the pool, the taint guards it, and node affinity or nodeSelector sends the right Pods to it.
Keep the division of labour clean when you review manifests. If a reviewer asks why a Pod runs on a node, the answer should name the label and affinity rule that attracted it. If a reviewer asks why other Pods cannot run there, the answer should name the taint. When one mechanism is asked to do both jobs, placement bugs follow, and they usually surface as capacity surprises rather than errors.
2. Kubernetes taints and tolerations: the three effects
Kubernetes taints and tolerations come in three effects, and picking the wrong one is the fastest way to cause an outage or a leak. NoSchedule blocks new Pods, PreferNoSchedule only biases placement, and NoExecute removes running Pods. Match the effect to how strict the boundary must be.
NoSchedule is the hard scheduling gate. A Pod without a matching toleration will not be scheduled onto the node. Pods already running there when the taint is added are left alone, because NoSchedule governs admission, not residence. That makes NoSchedule safe to add to a live pool: new arrivals stop, existing work drains naturally as Pods restart or scale down, and nothing is evicted by surprise. Most dedicated pools use NoSchedule for exactly this reason.
PreferNoSchedule is the soft version. The scheduler tries to avoid placing a non-tolerant Pod on the node, but if the alternatives are worse or unavailable, the Pod can still land there. It is a scoring nudge, not a guarantee. PreferNoSchedule suits nodes you would rather keep free, such as nodes with expensive licences or nodes nearing maintenance, where a hard block would strand Pods during a capacity crunch. It does not suit a pool boundary you must defend, because under pressure the scheduler will cross it.
NoExecute is the only effect that touches running Pods. Add a NoExecute taint and Pods that do not tolerate it are evicted from the node, while tolerant Pods stay according to their tolerationSeconds setting. New Pods without a toleration also cannot schedule there. NoExecute is the tool for draining a node by policy and the mechanism Kubernetes itself uses when a node becomes unreachable or not ready. It is powerful and abrupt, so treat it as an eviction action, not a scheduling preference.
| Effect | New Pods without toleration | Running Pods without toleration | Typical use |
|---|---|---|---|
| NoSchedule | Not scheduled on the node | Keep running | Dedicated pools: GPU, licensed, tenant, system |
| PreferNoSchedule | Scheduler tries to avoid the node, may still place | Keep running | Soft preference, maintenance windows, cost nudges |
| NoExecute | Not scheduled on the node | Evicted, subject to tolerationSeconds | Node failure handling, forced drains, policy evictions |
Read the table by asking what must happen to a Pod that is already running. If the answer is "nothing", you want NoSchedule or PreferNoSchedule. If the answer is "it must leave", you want NoExecute, and you should plan the eviction like any other disruption.
3. Kubernetes taints and tolerations: how matching works
Kubernetes taints and tolerations match on key, value, and effect, with two operators controlling how strict the value check is. Equal requires the same value, Exists accepts any value for the key, and every hard taint on a node must be tolerated before a Pod may schedule there.
A taint is written as key=value:effect, for example dedicated=gpu:NoSchedule. A toleration in the Pod spec names the key, the operator, the value when the operator needs one, and the effect. The default operator is Equal. With Equal, the toleration matches only when the key, the effect, and the value all line up. With Exists, the value is ignored, so the toleration matches any taint carrying that key and effect. Exists is the right choice when the key itself carries the meaning, such as nvidia.com/gpu, and the value is incidental.
Two wildcard forms deserve caution. A toleration with an empty effect matches that key across all effects, including NoExecute, which quietly grants eviction immunity you may not intend. A toleration with an empty key and operator Exists matches every taint on every node. That tolerate-everything form has legitimate uses in a small set of node agents, and it is a policy hole anywhere else. When you review a manifest, read an empty key the way you would read a wildcard in an access policy, because that is what it is.
Multiple taints combine as a filter. Start with every taint on the node, remove the ones the Pod tolerates, and apply whatever remains. One remaining NoSchedule taint blocks scheduling. One remaining NoExecute taint blocks scheduling and evicts a running Pod. Remaining PreferNoSchedule taints only lower the node's score. This is why adding a second taint to a pool breaks workloads that tolerated the first one: each hard taint needs its own matching toleration, and the failure message names the taint that was not tolerated.
Matching also has a boundary worth knowing. Tolerations are evaluated by the scheduler, so a Pod bound directly with spec.nodeName bypasses the check for NoSchedule. The kubelet still enforces NoExecute on such a Pod, so a hand-bound Pod can land on a tainted node and then be ejected. Direct nodeName binding is rare outside static Pods and debugging, but when a Pod appears somewhere a taint should have forbidden, check how it was bound before you blame the taint.
4. Kubernetes taints and tolerations: the dedicated pool recipe
Kubernetes taints and tolerations build a dedicated pool when combined with a label and affinity. The label names the pool, the taint keeps unrelated Pods out, and affinity sends the intended Pods in. Leave out any one of the three and the pool leaks in one direction or starves in the other.
Start at the pool definition, not at the node. In a managed cluster or an autoscaler-managed pool, taints and labels belong in the pool or NodePool configuration so every new node arrives with the same guard. A taint added by hand with kubectl taint is a fine experiment and a poor policy: the next node the pool creates will not have it, and controllers that reconcile pool state may remove it. Treat hand-applied taints as temporary maintenance actions with an expiry, and put permanent boundaries in the pool definition where they are reviewed and versioned.
The workload side needs both halves. The toleration opens the gate, and node affinity walks through it. The manifest below shows the pair for a GPU inference service. The affinity rule is required, not preferred, because the service cannot run without the hardware. The toleration uses Exists on the resource key, which keeps the manifest stable if the pool changes the taint value later.
Resource requests complete the picture. The GPU limit in the example is what reserves the device; the taint only controls admission. A Pod that tolerates the taint but requests no GPU can still occupy CPU and memory on the node, which is sometimes intended for sidecars and sometimes a leak. Review pool admission as a pair: which Pods may enter, and what they must request once inside.
Capacity planning changes once a pool is dedicated. General workloads can no longer borrow idle dedicated capacity, so the pool must be sized for its own peaks, and the autoscaler must be able to grow it. This is where pool-aware autoscaling matters; Karpenter vs Cluster Autoscaler compares how the two handle pool-shaped demand. A dedicated pool that cannot scale is a queue with expensive hardware attached.
5. Kubernetes taints and tolerations for GPU pools
Kubernetes taints and tolerations protect GPU pools from general workloads that would otherwise consume the most expensive capacity in the cluster. Taint the pool on the GPU resource key, tolerate it only in GPU workloads and required agents, and select GPU models with labels when the fleet is mixed.
GPU nodes fail the economics test when they run ordinary work. A CI runner on a GPU node costs GPU-node money to do CPU work, and worse, it holds CPU and memory that a GPU Pod needs alongside its device. The taint fixes the admission side: with nvidia.com/gpu tainted NoSchedule, only Pods that ask for the exception can land. Many GPU setups apply a taint like this automatically when the hardware is detected, so check the node's existing taints before adding your own, or you will debug a toleration that matches your taint while the operator's taint still blocks the Pod.
Mixed fleets need the label half of the recipe. A training job that needs a large-memory GPU and a serving job that fits a small one should not compete for the same nodes. GPU feature discovery labels usually expose the product name, so node affinity on that label routes each workload to the right tier while the shared taint keeps everyone else out. One taint for the boundary, labels for the tiers inside it, keeps the policy readable.
Agents are the recurring surprise. Metrics exporters, log collectors, and the GPU device plugin itself must run on GPU nodes, and each needs the toleration or it will silently skip those nodes. The symptom is a blind spot: dashboards look fine for general nodes and empty for GPU nodes, because the collector never scheduled there. When you taint a pool, list the DaemonSets that must cover it and check their tolerations in the same change. Section 8 covers that pattern in full.
Finally, keep GPU tolerations narrow. A toleration with operator Exists on the GPU key is reasonable for GPU workloads. A toleration that matches every key, copied from a DaemonSet example into an application manifest, dissolves the boundary you just built. The pool is only as dedicated as the broadest toleration in the cluster.
6. Kubernetes taints and tolerations for spot and interruptible pools
Kubernetes taints and tolerations make spot capacity opt-in, which is the only safe default for nodes that can disappear. Taint the interruptible pool, tolerate it only in workloads that survive abrupt loss, and let affinity decide how strongly those workloads prefer the cheaper nodes.
Spot and preemptible nodes trade reliability for price. The failure mode is not a slow degradation; the node is reclaimed and its Pods are gone, sometimes with a short warning window and sometimes with very little. Workloads differ sharply in how much that matters. A batch job with checkpointing loses minutes. A stateful service without fast failover loses availability. The taint encodes that difference as an admission rule: only Pods whose owners accepted interruption may schedule there.
The toleration is the acceptance signature, so it should be added deliberately, per workload, after someone answers three questions. Can the Pod be recreated elsewhere quickly? Does it hold state that must be rebuilt or reattached? Will its absence breach an availability target while replacements start? If any answer is uncomfortable, the workload stays on on-demand capacity and the cheaper pool serves the workloads that answered cleanly. This review is the real policy; the YAML is just where it gets recorded.
Affinity strength sets the economics. Required affinity pins a workload to the spot pool, which maximises savings and maximises exposure when spot capacity dries up. Preferred affinity lets the scheduler use spot nodes when available and fall back to on-demand nodes when they are not, which suits services that tolerate interruption but must keep running. Many teams run a blend: stateless replicas spread across both pools, with enough on-demand replicas to hold the service level if the spot pool vanishes at once.
Interruption handling still needs the eviction side. When a node is reclaimed, Pods get whatever termination grace the platform provides, and NoExecute behaviour plus tolerationSeconds shape how long Pods cling to a failing node. Section 9 covers that timing. For spot pools, the practical pairing is short grace handling in the application, fast readiness signalling on replacements, and alerts on replica count rather than on individual Pod deaths, because individual deaths are the normal price of the pool.
7. Kubernetes taints and tolerations for system and control-plane pools
Kubernetes taints and tolerations keep system nodes reserved for system work. Control-plane nodes carry a NoSchedule taint by default in most distributions, and the same pattern protects ingress, monitoring, and platform pools from application Pods that would compete with them.
The control-plane taint is the example most engineers meet first. Nodes running the API server, scheduler, and etcd are tainted so application Pods do not schedule beside them. Platform components that must run there, such as certain networking or monitoring agents, carry the matching toleration. If you have ever wondered why a DaemonSet manifest tolerates node-role.kubernetes.io/control-plane, that is the reason: the agent is on the short list of things allowed past the fence.
The same pattern generalises to any pool whose job is to serve the cluster rather than a tenant. Ingress nodes, observability backends, and shared platform services all benefit from a taint that keeps application replicas from crowding them during a scale-out event. The failure this prevents is correlated: an application incident drives a surge of Pods, the surge lands on the nodes running the ingress or the metrics pipeline, and the tools you need to diagnose the incident degrade at the same moment.
System pools also need the reverse discipline. A system Pod that tolerates the system taint can still schedule on general nodes unless affinity pins it, and a system component spread across general nodes may be fine or may defeat the purpose of the pool. Decide per component. Components that must be near the control plane or on specific network paths get required affinity. Components that merely need permission to run on system nodes, such as node agents, get the toleration without the pin.
Watch the blast radius of system tolerations. Because system Pods often run with elevated privileges, a broad toleration on a privileged Pod is worth extra scrutiny. The question is not only where the Pod may run, but what it may do when it gets there. Keep the toleration list for privileged workloads short, named, and reviewed, the same way you would treat any other cluster-wide permission. The broader habits behind this are collected in Kubernetes best practices.
8. Kubernetes taints and tolerations: DaemonSets on tainted nodes
Kubernetes taints and tolerations decide whether DaemonSets actually cover every node. A DaemonSet Pod follows the same taint rules as any other Pod, so a tainted pool without matching DaemonSet tolerations runs without logging, metrics, or security agents until someone notices the gap.
DaemonSets promise one Pod per node, but the promise is filtered through scheduling rules. If a node carries a NoSchedule taint the DaemonSet does not tolerate, the controller simply does not place a Pod there. There is no error state screaming for attention; the DaemonSet reports a desired count lower than the node count, and dashboards built from the missing agent show absence as calm. This is why tainting a new pool must trigger a DaemonSet review in the same change, not as a follow-up task.
Two toleration styles appear in DaemonSet manifests. The narrow style lists each pool taint the agent must cross, which keeps the agent off pools it has no business on. The broad style tolerates everything, using an empty key with operator Exists, which guarantees coverage on future pools without manifest edits. Broad is defensible for a small set of foundational agents, such as the CNI, kube-proxy where applicable, and core node telemetry. It is hard to defend for optional tooling. Choose per agent, and write the reason in the manifest or the chart values so the next reviewer does not have to guess.
Built-in node condition taints are already handled for DaemonSet Pods. When a node is marked not ready or unreachable, the NoExecute taints Kubernetes applies do not evict DaemonSet Pods the way they evict ordinary Pods, because the agent is often the thing reporting the problem. Pool taints you add yourself get no such automatic pass. The distinction matters during debugging: an agent missing from a healthy tainted node is a toleration problem, while an agent present on an unhealthy node is expected behaviour.
Verify coverage with data, not intent. After tainting a pool, compare the DaemonSet desired and current counts, and list Pods per node for the pools that matter. The commands in section 11 include the checks. A two-minute verification here prevents the classic incident review line where monitoring was absent on exactly the nodes that failed.
9. Kubernetes taints and tolerations: NoExecute and eviction timing
Kubernetes taints and tolerations control eviction timing through NoExecute and tolerationSeconds. When a node fails, Kubernetes taints it, tolerant Pods stay for their configured window, and the rest are evicted so controllers can recreate them on healthy nodes without waiting for manual intervention.
Kubernetes applies built-in taints when node conditions change. A node reporting Ready=False receives node.kubernetes.io/not-ready, and a node the control plane cannot reach receives node.kubernetes.io/unreachable. Both use NoExecute. Pressure conditions such as memory or disk pressure apply NoSchedule taints instead, which stop new arrivals without evicting what is running. Knowing which taint you are looking at tells you whether the node is closed, draining, or presumed gone.
tolerationSeconds is the per-Pod eviction timer for a tolerated NoExecute taint. A Pod that tolerates the taint without tolerationSeconds stays bound indefinitely. A Pod with tolerationSeconds: 300 stays for five minutes after the taint appears, then is evicted if the taint is still present. If the taint is removed before the timer expires, the Pod is not evicted. Kubernetes adds default tolerations of 300 seconds for the not-ready and unreachable taints to ordinary Pods, which is why Pods on a dead node typically move after about five minutes rather than instantly.
Tune the timer to the workload, in both directions. Stateless Pods behind a Service often benefit from a shorter window, because a replacement on a healthy node serves traffic sooner than a Pod waiting on a node that may never return. Pods with expensive startup, large caches, or stateful reattachment costs may justify a longer window, trading slower failover for fewer needless restarts during brief control-plane or network blips. The wrong move is copying a value from an example without connecting it to startup cost and failure behaviour.
Do not expect a PodDisruptionBudget to save a Pod from a dead node. Disruption budgets govern voluntary evictions through the eviction API, such as drains and upgrades. A node failure is not voluntary, and once the toleration window expires the Pod is removed so its controller can replace it. Use budgets to shape maintenance behaviour, and use tolerationSeconds plus replica count to shape failure behaviour. The next roadmap lesson takes up priority and preemption, which decide which Pods win when capacity is scarce; find it under Module 7 of the Kubernetes roadmap.
10. Kubernetes taints and tolerations: scheduling mechanics and edge cases
Kubernetes taints and tolerations act inside the scheduler filter and scoring stages. Hard taints remove nodes from consideration, PreferNoSchedule lowers a node's score, and a few edge cases around direct binding and taint removal explain most of the behaviour that looks like a bug.
Scheduling happens in two broad phases. Filtering removes nodes that cannot run the Pod, and scoring ranks the survivors. An untolerated NoSchedule or NoExecute taint fails the filter, so the node is out before scoring begins. PreferNoSchedule passes the filter and applies a scoring penalty, which is why a Pod can still land on a PreferNoSchedule node when every alternative is worse or filtered out. When a Pod lands somewhere unexpected, ask which phase allowed it: a filter failure is absolute, a score is negotiable.
Pending Pods report taint problems through events. The scheduler emits FailedScheduling events naming the untolerated taint, and kubectl describe pod surfaces them. That message is the fastest diagnostic in this whole topic: it names the exact key, value, and effect your toleration failed to match. Most mismatches are small. The effect differs, the value differs under Equal, or the toleration was added to the Deployment but the running Pods predate the change and need a rollout to pick it up.
Removing a taint does not move Pods back. Taints govern admission and eviction, not rebalancing. If you taint a node NoExecute, watch Pods leave, then remove the taint, the Pods that left stay where they landed. Controllers recreate Pods to satisfy replica counts; they do not migrate healthy Pods to refill a node. Plan taint changes as one-way doors for placement, and use rollouts or drains when you need Pods to move deliberately.
One more edge case: tolerations are Pod spec fields, so they are fixed at Pod creation. Editing a Deployment template changes future Pods, not running ones. During an incident, adding a toleration to a workload whose Pods are Pending works because those Pods get recreated or rescheduled with the new template once the rollout proceeds. Adding a toleration to protect already running Pods from a NoExecute taint you are about to apply requires the rollout to finish first. Sequence matters: roll out tolerations, confirm new Pods carry them, then apply the taint.
11. Kubernetes taints and tolerations: troubleshooting matrix
Kubernetes taints and tolerations fail in a small number of recognisable ways. A Pending Pod names its untolerated taint, a misplaced Pod points at missing affinity, and a missing agent points at DaemonSet tolerations. Start from the symptom and verify with node and Pod state.
Work the matrix top to bottom. Each row pairs a symptom with the most likely cause and the check that confirms it. The commands after the table cover the checks; run them against the node and Pod named in the event rather than scanning the whole cluster.
| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Pod Pending, event names an untolerated taint | Toleration missing, or key, value, or effect mismatch | kubectl describe pod; read the FailedScheduling event | Add or correct the toleration, then roll out |
| Pod Pending, no taint named | Node filtered for resources, affinity, or another constraint | Event text lists every filter failure | Fix the named constraint; taints may be innocent |
| Workload runs on general nodes, pool sits idle | Toleration present, affinity missing | Inspect Pod spec for nodeAffinity or nodeSelector | Add required affinity for the pool label |
| General Pods appear on the dedicated pool | Broad toleration in their manifests, or pool taint missing on new nodes | Audit tolerations; check taints on every pool node | Narrow tolerations; set the taint in the pool definition |
| DaemonSet missing on tainted nodes | DaemonSet lacks the pool toleration | Compare desired and current DaemonSet counts | Add the toleration to the DaemonSet template |
| Pods evicted after a taint change | NoExecute applied where NoSchedule was intended | kubectl describe node; read the taint effect | Reapply with NoSchedule; review change process |
| Pods linger on a dead node | tolerationSeconds too long, or toleration without a timer | Inspect Pod tolerations for not-ready and unreachable | Set a deliberate tolerationSeconds value |
| Taint keeps disappearing | Pool controller reconciles taints from pool config | Compare node taints with pool definition | Change the pool definition, not the node |
Two habits prevent most rows in the matrix. First, read the event before changing anything; the scheduler already tells you which taint blocked the Pod. Second, verify pool state on every node, not one node, because pools grow and a hand-applied taint covers only the nodes that existed when you ran the command.
12. Kubernetes taints and tolerations: rollout checklist for dedicated nodes
Kubernetes taints and tolerations reward a careful rollout order. Define the pool boundary first, roll out tolerations and affinity to the workloads that belong inside it, confirm DaemonSet coverage, and only then enforce the taint, so nothing breaks in the gap between policy and manifests.
The order matters because each step protects the next. If the taint lands before the tolerations, the intended workloads go Pending and the change looks like an outage. If tolerations land without affinity, workloads gain permission without direction and placement barely changes. If DaemonSets are forgotten, the pool runs unobserved. The checklist below sequences the work so every intermediate state is safe.
Dedicated pool rollout checklist
- Name the pool boundary in one sentence: which workloads belong, and which must never run there.
- Choose the taint key and effect. Use NoSchedule for admission control; reserve NoExecute for eviction actions.
- Set the label and taint in the pool or NodePool definition, not by hand on individual nodes.
- Add the toleration and required node affinity to each workload that belongs in the pool.
- Add pool tolerations to every DaemonSet that must cover the pool, narrowly where possible.
- Decide tolerationSeconds for not-ready and unreachable per workload, based on startup cost.
- Roll out workload changes and confirm new Pods carry the toleration before enforcing the taint.
- Apply the taint, then verify: intended Pods schedule, unrelated Pods stay out, DaemonSet counts match node counts.
- Audit broad tolerations across the cluster, especially empty-key Exists entries outside foundational agents.
- Size the pool for its own peaks, since general capacity can no longer borrow from it.
- Document the boundary where workload owners will find it, with the exact toleration they must add.
- Rehearse removal: know the command and the pool change that lifts the taint if the boundary must move.
Governance keeps the boundary honest after rollout. New workloads should meet the pool policy in review, not in a Pending event at deploy time. A short platform note with the taint key, the required toleration snippet, and the affinity label turns a scheduling failure into a copy-paste fix. Periodic audits catch the slow drift: tolerations copied into new services, pool taints edited by hand, DaemonSets added without pool coverage.
Done well, dedicated nodes stop being a source of placement arguments. The pool states its rule once, workloads state their exception explicitly, and the scheduler enforces both on every placement decision. That is the same contract the rest of this module builds on: explicit placement policy, verified against live state, with the next Module 7 lesson on spread and preemption building directly on it.
Frequently Asked Questions
What is the difference between Kubernetes taints and tolerations and node affinity?
Affinity attracts: a Pod uses labels to ask for a kind of node. Kubernetes taints and tolerations repel: a node refuses Pods unless a Pod carries a matching toleration. Dedicated pools need both, because affinity alone cannot keep unrelated Pods off a node, and a toleration alone does not steer a Pod toward the pool.
In Kubernetes taints and tolerations, does a toleration guarantee that a Pod will schedule on the tainted node?
No. A toleration removes the taint barrier; the scheduler still checks resources, affinity, and every other constraint, and it may choose a different node. To send a Pod to dedicated nodes, pair the toleration with node affinity or nodeSelector on the pool label.
What is the difference between NoSchedule and NoExecute in Kubernetes taints and tolerations?
NoSchedule blocks new Pods that do not tolerate the taint and leaves running Pods alone. NoExecute also blocks new Pods, and it evicts running Pods that do not tolerate it. Use NoSchedule for pool boundaries and NoExecute when running Pods must leave, such as node failure handling.
In Kubernetes taints and tolerations, what does tolerationSeconds do?
tolerationSeconds sets how long a Pod that tolerates a NoExecute taint may stay on the node after the taint appears. When the timer expires and the taint is still present, the Pod is evicted. Without tolerationSeconds, a tolerant Pod stays indefinitely. Kubernetes adds a default of 300 seconds for the not-ready and unreachable taints.
In Kubernetes taints and tolerations, why is my Pod Pending with an untolerated taint event?
The scheduler found a taint on every candidate node that the Pod does not tolerate. Read the FailedScheduling event with kubectl describe pod; it names the taint key, value, and effect. Then add a matching toleration, checking that the operator and value line up, and roll out the workload so new Pods carry it.
How do DaemonSets run on tainted dedicated nodes?
DaemonSet Pods obey the same taint rules as other Pods, so the DaemonSet template needs a toleration for each pool taint the agent must cross. Foundational agents sometimes tolerate all taints; narrower per-pool tolerations are safer for optional tooling. Verify coverage by comparing DaemonSet desired and current counts after tainting a pool.
How do I remove a taint from a node?
Run kubectl taint nodes with the same key, value, and effect followed by a trailing minus sign, for example kubectl taint nodes node1 dedicated=gpu:NoSchedule-. If the taint comes from a pool definition, change the pool configuration instead, or the controller will restore it. Removing a taint does not move Pods back onto the node.
Preparing for Senior Platform & SRE Interviews
Practice real-world cluster triage, RBAC debugging, and pod scheduling scenarios in our Kubernetes scenario interview questions hub.
Explore Interview Scenarios →