Study. uk . com
  1. Home
  2. All questions
  3. Question 677

CKA study material · question 677 of 1000

A Pod spec has two topology spread constraints, both with topologyKey kubernetes.io/hostname and whenUnsatisfiable: DoNotSchedule. Why is this rejected?

  1. A Pod may carry only one spread constraint in total
  2. DoNotSchedule may not be used with the hostname key
  3. Only one constraint may combine a given topologyKey with a given whenUnsatisfiable value
  4. Both constraints must set minDomains when they share a key
Show the answer

Answer: C. Only one constraint may combine a given topologyKey with a given whenUnsatisfiable value

Two constraints on the same topologyKey are allowed only when their whenUnsatisfiable values differ, so a second DoNotSchedule constraint on the same key is invalid.

Source: Pod Topology Spread Constraints (Kubernetes) — Spread constraint definition

Challenge yourself on this topic → Study as cards