minecraft
This commit is contained in:
parent
0fd9936db5
commit
192e2e869f
7
apps/minecraft/README.md
Normal file
7
apps/minecraft/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
## Sending a command
|
||||
```
|
||||
kubectl exec -it -n minecraft deploy/minecraft-server -- /bin/bash
|
||||
mc-send-to-console /help
|
||||
# or directly
|
||||
kubectl exec -it -n minecraft deploy/minecraft-server -- mc-send-to-console /help
|
||||
```
|
56
apps/minecraft/deployment.yaml
Normal file
56
apps/minecraft/deployment.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minecraft-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minecraft-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minecraft-server
|
||||
spec:
|
||||
containers:
|
||||
- name: minecraft-server
|
||||
image: minecraft
|
||||
resources:
|
||||
limits:
|
||||
memory: "4000Mi"
|
||||
cpu: "2500m"
|
||||
requests:
|
||||
memory: "1000Mi"
|
||||
cpu: "500m"
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
env:
|
||||
- name: EULA
|
||||
value: "TRUE"
|
||||
- name: MODPACK
|
||||
value: "https://www.curseforge.com/api/v1/mods/711537/files/5076228/download"
|
||||
- name: VERSION
|
||||
value: "1.18.2"
|
||||
# - name: VERSION
|
||||
# value: "1.16.5"
|
||||
# - name: MODPACK
|
||||
# value: "https://mediafilez.forgecdn.net/files/3602/5/VaultHunters-OfficialModpack-1.12.1-Server.zip"
|
||||
- name: INIT_MEMORY
|
||||
value: "1G"
|
||||
- name: MAX_MEMORY
|
||||
value: "3G"
|
||||
- name: MOTD
|
||||
value: "VaultHunters baby!"
|
||||
- name: ENABLE_RCON
|
||||
value: "false"
|
||||
- name: CREATE_CONSOLE_IN_PIPE
|
||||
value: "true"
|
||||
- name: ONLINE_MODE
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- name: minecraft-data
|
||||
mountPath: /data
|
||||
|
||||
volumes:
|
||||
- name: minecraft-data
|
||||
persistentVolumeClaim:
|
||||
claimName: minecraft-data
|
15
apps/minecraft/kustomization.yaml
Normal file
15
apps/minecraft/kustomization.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: minecraft
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- pvc.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
|
||||
images:
|
||||
- name: minecraft
|
||||
newName: itzg/minecraft-server
|
||||
newTag: java21
|
4
apps/minecraft/namespace.yaml
Normal file
4
apps/minecraft/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: placeholder
|
11
apps/minecraft/pvc.yaml
Normal file
11
apps/minecraft/pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: minecraft-data
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
12
apps/minecraft/service.yaml
Normal file
12
apps/minecraft/service.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft-server
|
||||
spec:
|
||||
selector:
|
||||
app: minecraft-server
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.3.4
|
Loading…
x
Reference in New Issue
Block a user