Kubernetes Simulator

intermediate · ~10 min

Reserved seating

The batch team has paid for hackademy-worker2 (labelled pool=batch). They want it to themselves: nothing else should run there, and their jobs should run nowhere else.

A selector pulls pods towards a node; a taint pushes every other pod away. kubectl taint nodes NAME key=value:NoSchedule keeps off any pod without a matching toleration. NoSchedule only affects scheduling — pods already on the node stay until something replaces them.

Objectives

  • Taint hackademy-worker2 dedicated=batch:NoSchedule
  • Run batch (2 replicas) on hackademy-worker2, tolerating the taint
  • Move all 4 web pods off hackademy-worker2
  • Bonus: Check the node's taints with kubectl describe node

Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.