Node fleet, mission 5 of 8
One basket
advanced, about 15 minutes, in the Kubernetes Simulator
Opens once you pass Kernel patch.
The briefing
From Dana Kowalski, on-call lead at Larchwood (a fictional company)
Last night hackademy-worker rebooted and the orders API was down for four minutes. It has two replicas — both were on that node.
Make sure two api replicas can never share a node again, without taking the API down while you do it. api.yaml is its manifest.
What you'll do
- api's pods refuse to share a node with another api pod
- api: 2 ready replicas, one on each worker
- Bonus star: Never fewer than one ready api pod
The mission checks the cluster, not your keystrokes: any fix that works, passes.
Concepts
Pod anti-affinity
A rule about other pods: don't schedule me where a pod matching this label selector already runs.
Read the Kubernetes docstopologyKeysets what "where" means:kubernetes.io/hostnameis one node.required…is a hard filter,preferred…only a score. The scheduler checks it at placement time; running pods are never moved.maxSurge and maxUnavailable
A rolling update's two bounds.
Read the Kubernetes docsmaxSurgeis how many extra pods may exist during the update (default 25%, rounded up);maxUnavailableis how many may be missing (default 25%, rounded down). With 2 replicas the defaults mean: add a new pod first, never drop below 2.
More Node fleet missions
- 1. The right hardware
- 2. Reserved seating
- 3. It doesn't fit
- 4. Kernel patch
- 5. One basket
- 6. All on one
- 7. Not on spot
- 8. Checkout first