mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
51 lines
860 B
YAML
51 lines
860 B
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
labels:
|
|
app: example
|
|
name: example
|
|
spec:
|
|
replicas: 1
|
|
serviceName: example
|
|
selector:
|
|
matchLabels:
|
|
app: example
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: example
|
|
spec:
|
|
containers:
|
|
- name: mc
|
|
image: itzg/minecraft-server
|
|
env:
|
|
- name: EULA
|
|
value: "TRUE"
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
service: example
|
|
name: example
|
|
spec:
|
|
ports:
|
|
- port: 25565
|
|
targetPort: 25565
|
|
selector:
|
|
app: example
|
|
type: LoadBalancer
|