k8s-clusters/home/manifests/apps/minecraft/forge-1.18.2-create/deployment.yaml

61 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2022-07-17 14:47:49 -05:00
# docker run -d -it -v /path/on/host:/data -e EULA=TRUE -p 25565:25565 --name mc itzg/minecraft-server
apiVersion: apps/v1
kind: Deployment
metadata:
name: minecraft-forge-server
labels:
app: minecraft-forge-server
spec:
replicas: 1
selector:
matchLabels:
app: minecraft-forge-server
template:
metadata:
labels:
app: minecraft-forge-server
spec:
volumes:
- name: minecraft-forge-data
persistentVolumeClaim:
claimName: minecraft-forge-data-pvc
containers:
- name: minecraft-forge-server
image: itzg/minecraft-server:latest
resources:
limits:
memory: 6Gi
requests:
memory: 2Gi
env:
- name: EULA
value: 'TRUE'
- name: MODE
value: suvival
- name: MOTD
value: SURVIVE. GATHER. CREATE.
- name: ALLOW_FLIGHT
value: 'TRUE'
ports:
- containerPort: 30020
name: minecraft
volumeMounts:
- name: minecraft-forge-data
mountPath: /data
readinessProbe:
exec:
command:
- mcstatus
- 127.0.0.1
- ping
initialDelaySeconds: 30
periodSeconds: 30
livenessProbe:
exec:
command:
- mcstatus
- 127.0.0.1
- ping
initialDelaySeconds: 30
periodSeconds: 30