Node Affinity

Tolerations let a Pod in. Affinity decides where it wants to be — and splits one fleet into two roles.

Skill labintermediate~25 minPro

What you'll do

  • ✓Label nodes to describe what they are for
  • ✓Select nodes with required node affinity
  • ✓Use NotIn to express a complement set
  • ✓Explain how affinity differs from a toleration

Lab outline

  1. 01Labels are the vocabulary
  2. 02Required affinity
  3. 03The complement set

Before you start

  • Taints and tolerations
  • Running a DaemonSet

Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.

← All Kubernetes labs

Your first machine is
8 seconds away.

Learn by doing on real machines — and give every AI agent one of its own.

Free forever · No credit card · Cancel anytime