Kubernetes Simulator

advanced · ~12 min

Saves that survive

Players are furious: every time a server restarts, its matches vanish. arena-server saves to /data — which today is just the container's own filesystem, gone with the container (kubectl logs arena-0 says as much).

A StatefulSet can give every pod its own PersistentVolumeClaim from volumeClaimTemplates: arena-0 gets saves-arena-0, and a replacement arena-0 gets the same claim back. One catch: the claim templates can't be added to a StatefulSet that already exists.

Objectives

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