Repository navigation
Expand file tree
/
Copy pathmc-server-bedrock.yml
More file actions
72 lines (70 loc) · 3.03 KB
/
Copy pathmc-server-bedrock.yml
File metadata and controls
72 lines (70 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
apiVersion: 'agones.dev/v1'
kind: GameServer
metadata:
annotations:
external-dns.alpha.kubernetes.io/hostname: <DOMAIN>
generateName: 'mc-bedrock-' # Generates a unique name for GameServer and Pod
spec:
container: mc-server # Minecraft server container name
ports:
- name: mc
# "Dynamic" (default) the system allocates a free hostPort for the gameserver (default 7000-8000), for game clients to connect to
portPolicy: Dynamic
# The name of the container to open the port on. Defaults to the game server container if omitted or empty.
container: mc-server
# the port that is being opened on the game server process
containerPort: 19132
# Bedrock uses UDP to connect players
protocol: UDP
# Health checking for the running game server
health:
# Number of seconds after the container has started before health check is initiated.
initialDelaySeconds: 300
# If the `Health()` function doesn't get called at least once every period (seconds), then
# the game server is not healthy.
periodSeconds: 12
# Minimum consecutive failures for the health probe to be considered failed after having succeeded.
failureThreshold: 5
template:
spec:
containers:
- name: mc-server
image: itzg/minecraft-bedrock-server # Minecraft bedrock server image
imagePullPolicy: Always
env: # Full list of ENV variables at https://github.com/itzg/docker-minecraft-bedrock-server
- name: EULA
value: "TRUE"
volumeMounts:
- mountPath: /data # shared vol with mc-load and mc-backup
name: world-vol
- name: mc-monitor
image: saulmaldonado/agones-mc
args:
- monitor
- --attempts=5 # matches spec.health.failureThreshold
- --initial-delay=60s # matches spec.health.initialDelaySeconds
- --interval=10s # below spec.health.periodSecond
- --timeout=10s # matches interval
- --port=19132 # matches mc-server containerPort
- --edition=bedrock # bedrock edition
imagePullPolicy: Always
- name: mc-backup
image: saulmaldonado/agones-mc # backup
args:
- backup
- --gcp-bucket-name=agones-minecraft-mc-worlds # GCP Cloud storage bucket name for world archives
- --backup-cron=*/5 * * * * # crontab for recurring backups. omiting flag will only run backup once
- --initial-delay=60s # delay for mc-server to build world before scheduling backup jobs
- --edition=bedrock
env:
- name: NAME
valueFrom:
fieldRef:
fieldPath: metadata.name # GameServer ref for naming backup zip files
imagePullPolicy: Always
volumeMounts:
- mountPath: /data # shared vol with mc-server
name: world-vol
volumes:
- name: world-vol # shared vol between containers. will not persist bewteen restarts
emptyDir: {}