Multiplayer game server, mission 7 of 7
Claim it back
advanced, about 15 minutes, in the Kubernetes Simulator
Opens once you pass Saves that survive.
The briefing
From Priya Raman, senior backend developer at Larchwood (a fictional company)
The rebuild went ahead last night, and the claims were deleted after all. Because the volumes were set to Retain, they're still there — kubectl get pv shows them Released.
Bring arena back with arena.yaml, and make sure arena-0 and arena-1 come up with their old saves, not fresh, empty disks. If the StatefulSet makes its claims before you've lined the volumes up, they'll get new ones.
What you'll do
- arena: 2 servers running
- Both came back with their saves
- Bonus star: No new, empty volume made along the way
The mission checks the cluster, not your keystrokes: any fix that works, passes.
Concepts
Released volumes
A Released volume still names its old claim in
Read the Kubernetes docsspec.claimRef, uid and all, so it won't bind to anything else — even a new claim with the same name. Remove the claimRef and it becomes Available; a claim that asks for it withvolumeNamethen binds to it, data and all.
More Multiplayer game server missions
- 1. Every server has a name
- 2. Saves that survive
- 3. One server first
- 4. Don't empty the arena
- 5. Stranded
- 6. Saves that survive
- 7. Claim it back