Lifecycle and health probes
Control desired running state, graceful shutdown, and probe timing so slow games recover without restart loops or data loss.
Disabling readiness/liveness probes masks underlying failures. If your game crashes frequently, investigate the root cause instead of loosening probe thresholds.
Running, suspended, and restart behavior
Desired state determines whether Kubernetes maintains a running replica or scales the StatefulSet to zero.
Graceful termination
The operator waits for the template stop sequence within the configured 0–600 second grace window.
Tune readiness, liveness, and startup
Override timing one probe family at a time; startup protects boot, readiness gates traffic, and liveness triggers recovery.
PROBE MODEL
Configuring via YAML
Override probes in the GameServer spec to tune timing for your specific game:
apiVersion: gameplane.io/v1alpha1
kind: GameServer
metadata:
name: my-game
spec:
templateRef:
name: minecraft
# Set suspend to true to stop the server
suspend: false
# Set the grace period for graceful shutdown (0-600 seconds)
stopGracePeriodSeconds: 60
# Override template probes with custom timing
probes:
startup:
# Allow up to 10 minutes for the game to start
failureThreshold: 300
periodSeconds: 2
readiness:
# Check readiness every 5 seconds
periodSeconds: 5
failureThreshold: 3
liveness:
# Check liveness every 30 seconds
periodSeconds: 30
failureThreshold: 3
Suspending with idle auto-sleep
If you enable idle auto-sleep (spec.idle.enabled: true), the operator scales the server down automatically after it reports zero players for the configured idle period. The graceful termination sequence still runs — the template’s stop sequence executes with the same grace period, and data is preserved.
For more details, see the spec.idle configuration in the architecture docs.
Understanding phases and transitions
- Pending → Starting → Running: The pod is initializing and probes are passing.
- Running (steady state): The game is healthy and accepting connections.
- Stopping: The grace period is active; the template stop sequence is running if defined.
- Stopped: The pod has been forcibly terminated (grace period expired or no stop sequence).
- Suspended: The pod is scaled to zero via
spec.suspend=true. Data is preserved; use Start to resume. - Failed: The pod crashed and is not recovering. Check the console and logs.
Hover over the phase badge on the server overview to see the current condition and reason.
Next guide: Ownership and danger zone