2025-04-13 16:18:40 +01:00
|
|
|
---
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: minecraft
|
|
|
|
|
namespace: minecraft
|
|
|
|
|
labels:
|
|
|
|
|
app: minecraft
|
|
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: minecraft
|
|
|
|
|
replicas: 1
|
|
|
|
|
strategy:
|
|
|
|
|
type: Recreate
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: minecraft
|
|
|
|
|
spec:
|
|
|
|
|
nodeSelector:
|
|
|
|
|
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
|
|
|
|
volumes:
|
|
|
|
|
- name: storage
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /k8s/mc-server/
|
2025-04-24 21:23:37 +00:00
|
|
|
type: DirectoryOrCreate
|
2025-04-13 16:18:40 +01:00
|
|
|
- name: nginx-config
|
|
|
|
|
configMap:
|
|
|
|
|
name: nginx-config
|
2026-02-10 12:10:24 +02:00
|
|
|
- name: win-install-script
|
|
|
|
|
configMap:
|
|
|
|
|
name: win-install-script
|
2025-04-13 16:18:40 +01:00
|
|
|
|
|
|
|
|
terminationGracePeriodSeconds: 10
|
|
|
|
|
containers:
|
|
|
|
|
- name: minecraft
|
|
|
|
|
image: 'openjdk:8-jdk-alpine'
|
|
|
|
|
command: ["java"]
|
|
|
|
|
args:
|
2025-06-25 21:51:03 +00:00
|
|
|
- -Xms4G
|
|
|
|
|
- -Xmx4G
|
2025-04-13 16:18:40 +01:00
|
|
|
- -XX:+UseG1GC
|
|
|
|
|
- -XX:+ParallelRefProcEnabled
|
|
|
|
|
- -XX:MaxGCPauseMillis=200
|
|
|
|
|
- -XX:+UnlockExperimentalVMOptions
|
|
|
|
|
- -XX:+DisableExplicitGC
|
|
|
|
|
- -XX:+AlwaysPreTouch
|
|
|
|
|
- -XX:G1NewSizePercent=30
|
|
|
|
|
- -XX:G1MaxNewSizePercent=40
|
|
|
|
|
- -XX:G1HeapRegionSize=8M
|
|
|
|
|
- -XX:G1ReservePercent=20
|
|
|
|
|
- -XX:G1HeapWastePercent=5
|
|
|
|
|
- -XX:G1MixedGCCountTarget=4
|
|
|
|
|
- -XX:InitiatingHeapOccupancyPercent=15
|
|
|
|
|
- -XX:G1MixedGCLiveThresholdPercent=90
|
|
|
|
|
- -XX:G1RSetUpdatingPauseTimePercent=5
|
|
|
|
|
- -XX:SurvivorRatio=32
|
|
|
|
|
- -XX:+PerfDisableSharedMem
|
|
|
|
|
- -XX:MaxTenuringThreshold=1
|
|
|
|
|
- -jar
|
|
|
|
|
- forge-1.12.2-14.23.5.2854.jar
|
|
|
|
|
- nogui
|
|
|
|
|
workingDir: /mc/
|
|
|
|
|
resources:
|
2025-07-18 13:46:54 +03:00
|
|
|
requests:
|
|
|
|
|
memory: "8Gi"
|
|
|
|
|
cpu: "2000m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "12Gi"
|
|
|
|
|
cpu: "4000m"
|
2025-04-13 16:18:40 +01:00
|
|
|
ports:
|
|
|
|
|
- name: game
|
|
|
|
|
containerPort: 25565
|
|
|
|
|
protocol: TCP
|
|
|
|
|
- name: dynmap
|
|
|
|
|
containerPort: 8123
|
|
|
|
|
protocol: TCP
|
2025-07-25 15:43:10 +00:00
|
|
|
- name: webstatus-mod
|
|
|
|
|
containerPort: 8080
|
|
|
|
|
protocol: TCP
|
2026-02-10 11:39:00 +02:00
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /
|
|
|
|
|
port: 8123
|
|
|
|
|
initialDelaySeconds: 120
|
|
|
|
|
periodSeconds: 30
|
|
|
|
|
timeoutSeconds: 5
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /
|
|
|
|
|
port: 8123
|
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
timeoutSeconds: 5
|
|
|
|
|
failureThreshold: 3
|
2025-04-13 16:18:40 +01:00
|
|
|
volumeMounts:
|
|
|
|
|
- name: storage
|
|
|
|
|
mountPath: /mc
|
2025-07-25 15:43:10 +00:00
|
|
|
- name: nginx
|
|
|
|
|
image: nginx:latest
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "64Mi"
|
|
|
|
|
cpu: "50m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "256Mi"
|
|
|
|
|
cpu: "200m"
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 80
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: nginx-config
|
|
|
|
|
mountPath: /etc/nginx/nginx.conf
|
|
|
|
|
subPath: nginx.conf
|
|
|
|
|
- name: storage
|
|
|
|
|
mountPath: /mc
|
2026-02-10 12:10:24 +02:00
|
|
|
- name: win-install-script
|
|
|
|
|
mountPath: /mc/clients/win-install.ps1
|
|
|
|
|
subPath: win-install.ps1
|
2025-04-13 16:18:40 +01:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: minecraft-exporter
|
|
|
|
|
namespace: minecraft
|
|
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
app: minecraft
|
|
|
|
|
ports:
|
|
|
|
|
- protocol: TCP
|
|
|
|
|
port: 19565
|
|
|
|
|
targetPort: 19565
|
|
|
|
|
|