liveBook · Manning

Toleration

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A toleration is a Kubernetes pod scheduling specification that permits placement on a node with a matching taint.

A toleration is a pod scheduling specification that permits placement on a node with a matching taint. Taints repel pods unless their specifications include the required toleration; a toleration permits scheduling but does not select a particular node. section 2.1.3

Use tolerations when an operational task requires a pod to run on a tainted node:

  • Match the pod specification to the taint’s key, value when present, and effect; a taint requires a key and effect but may omit a value. section 2.1.3

Allowing a pod onto a tainted node

A control-plane node commonly carries the taint node-role.kubernetes.io/control-plane:NoSchedule, which prevents ordinary application pods from being scheduled there. CoreDNS provides a concrete comparison: inspect its tolerations with kubectl get pod ... -o yaml -n kube-system | grep tolerations -A14, then compare the result with the node taint. For a hands-on check, generate pod-tolerate.yaml, add the required toleration, create it, and verify placement with kubectl get pods -o wide. section 2.1.3

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains taint matching through keys, optional values, effects, YAML inspection, and kubectl verification, without detailing scheduler internals.
Examples
Uses the control-plane NoSchedule taint, CoreDNS toleration output, and a generated nginx pod manifest for practical verification.
What it assumes
Assumes basic familiarity with Kubernetes nodes, pods, YAML specifications, and kubectl inspection and creation commands.
What you can do after
Operate/configure pods with tolerations and verify their placement using kubectl node and pod output.
How it connects
Connects tolerations to taints, pod scheduling, control-plane nodes, worker nodes, CoreDNS, and Kubernetes YAML specifications.

Also explained in

Compare how 4 books explain toleration →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.