Gluttony-Cluster/games/minecraft/minecraft-deployment.yaml

49 lines
1.2 KiB
YAML
Raw Normal View History

2023-12-15 00:27:53 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: minecraft
namespace: games-ns
spec:
replicas: 1
selector:
matchLabels:
app: games
template:
metadata:
labels:
app: games
spec:
containers:
- name: minecraft
image: itzg/minecraft-server
2023-12-15 00:35:37 +00:00
env:
- name: EULA
value: "TRUE"
2023-12-15 00:47:00 +00:00
- name: ENABLE_RCON
value: "TRUE"
- name: RCON_PORT
value: 28016
2023-12-15 00:35:37 +00:00
2023-12-15 00:27:53 +00:00
ports:
- containerPort: 25565
2023-12-15 00:47:00 +00:00
- containerPort: 28016
2023-12-15 00:32:20 +00:00
#readinessProbe:
# exec:
# command: [ "/usr/local/bin/mc-monitor", "status", "--host", "localhost" ]
# # Give it i + p * f seconds to be ready, so 120 seconds
# initialDelaySeconds: 20
# periodSeconds: 5
# failureThreshold: 20
#livenessProbe:
# exec:
# command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
# initialDelaySeconds: 120
# periodSeconds: 60
2023-12-15 00:27:53 +00:00
volumeMounts:
- name: minecraft-data
mountPath: /data
volumes:
- name: minecraft-data
persistentVolumeClaim:
claimName: minecraft-data-pvc