Skip to content

Commit 034a85c

Browse files
committed
Add Kubernetes probes and graceful shutdown for zomboid
- startupProbe: 10min window (30s delay + 60x10s) for SteamCMD download + world gen - livenessProbe: pgrep ProjectZomboid every 30s (mirrors Docker HEALTHCHECK) - terminationGracePeriodSeconds: 120s for RCON save+quit on large worlds Without these, K8s kills the pod during first boot before the game downloads, and Docker HEALTHCHECKs are ignored by Kubernetes. https://claude.ai/code/session_01FNYCPSa4yr9KkHZJ4fST38
1 parent 183ad26 commit 034a85c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

my-apps/home/project-zomboid/deployment.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ spec:
1515
labels:
1616
app: project-zomboid
1717
spec:
18+
terminationGracePeriodSeconds: 120
1819
initContainers:
1920
- name: copy-config
2021
image: busybox
@@ -93,6 +94,23 @@ spec:
9394
- name: rcon
9495
containerPort: 27015
9596
protocol: TCP
97+
startupProbe:
98+
exec:
99+
command:
100+
- pgrep
101+
- -f
102+
- ProjectZomboid
103+
initialDelaySeconds: 30
104+
periodSeconds: 10
105+
failureThreshold: 60
106+
livenessProbe:
107+
exec:
108+
command:
109+
- pgrep
110+
- -f
111+
- ProjectZomboid
112+
periodSeconds: 30
113+
failureThreshold: 3
96114
volumeMounts:
97115
- name: server-files
98116
mountPath: /project-zomboid

0 commit comments

Comments
 (0)