2020-11-02 22:32:40 -05:00
|
|
|
---
|
|
|
|
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
|
2020-11-03 21:24:05 -05:00
|
|
|
image: itzg/minecraft-server:latest
|
2020-11-02 22:32:40 -05:00
|
|
|
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
|