scripts/fogcutter/k8s/minecraft.yml

56 lines
1.0 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: minecraft
name: minecraft
namespace: pew
spec:
replicas: 1
selector:
matchLabels:
run: minecraft
template:
metadata:
labels:
run: minecraft
spec:
containers:
- name: minecraft
image: itzg/minecraft-server
env:
- name: EULA
value: "TRUE"
- name: MAX_MEMORY
value: "8G"
- name: VERSION
value: "1.15.2"
volumeMounts:
- mountPath: /data
name: minecraft-data
readOnly: false
ports:
- name: minecraft
containerPort: 25565
volumes:
- name: minecraft-data
hostPath:
path: /bigdata/k8s-config/minecraft/data
---
apiVersion: v1
kind: Service
metadata:
labels:
run: minecraft
name: minecraft
namespace: pew
spec:
selector:
run: minecraft
ports:
- name: minecraft
port: 25565
protocol: TCP