Lesson  in  Kubernetes 101

Challenge: schedule the pending Pods

Two Pods in Pending on a multi-node cluster: a nodeSelector that no node satisfies and a taint without a toleration. Solve it by labeling nodes and adding tolerations, without removing the taint.

The book's Scheduling chapter introduces the vocabulary that governs where each Pod runs: node labels, nodeSelector, affinity, taints and tolerations. This challenge puts the two most important mechanisms to work on a real multi-node cluster.

You will find a Pod that demands a label no node has, and another that has to run on a reserved node with a taint it does not tolerate. As in production, constraints are not deleted: they are satisfied. You will have to label a node for the first one and declare a toleration for the second, respecting the infrastructure team's taint.

Passing criterion: the Pod batch runs on a labeled node while keeping its nodeSelector, and the Pod monitor runs on node-01 with the taint intact. A detail to take away: the toleration lets the Pod into the node, but it is the nodeSelector that forces it to go there. They are complementary mechanisms, not equivalent ones.