minecraft.yaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. # https://github.com/itzg/docker-minecraft-server/blob/master/README.md
  2. #
  3. # Check health with:
  4. # docker container inspect -f "{{.State.Health.Status}}" mc
  5. apiVersion: v1
  6. kind: Service
  7. metadata:
  8. name: minecraft
  9. labels:
  10. run: minecraft
  11. spec:
  12. ports:
  13. - name: rcon
  14. port: 25575
  15. targetPort: 25575
  16. - name: server
  17. port: 25565
  18. targetPort: 25565
  19. selector:
  20. run: minecraft
  21. type: LoadBalancer
  22. loadBalancerIP: 10.42.42.215
  23. externalTrafficPolicy: Local
  24. ---
  25. apiVersion: v1
  26. kind: PersistentVolume
  27. metadata:
  28. name: minecraft-data
  29. spec:
  30. capacity:
  31. storage: 10Ti
  32. volumeMode: Filesystem
  33. accessModes:
  34. - ReadWriteMany
  35. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  36. storageClassName: default
  37. mountOptions:
  38. - hard
  39. - nfsvers=3
  40. nfs:
  41. path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/minecraft-data
  42. server: 10.42.42.10
  43. claimRef:
  44. name: minecraft-data
  45. namespace: default
  46. ---
  47. apiVersion: v1
  48. kind: PersistentVolumeClaim
  49. metadata:
  50. name: minecraft-data
  51. spec:
  52. storageClassName: standard
  53. accessModes:
  54. - ReadWriteMany
  55. resources:
  56. requests:
  57. storage: 10Ti
  58. status: {}
  59. ---
  60. apiVersion: apps/v1
  61. kind: Deployment
  62. metadata:
  63. name: minecraft
  64. spec:
  65. replicas: 1
  66. selector:
  67. matchLabels:
  68. run: minecraft
  69. strategy:
  70. type: Recreate
  71. template:
  72. metadata:
  73. labels:
  74. run: minecraft
  75. spec:
  76. terminationGracePeriodSeconds: 90
  77. containers:
  78. - image: itzg/minecraft-server:latest
  79. imagePullPolicy: "Always"
  80. name: minecraft
  81. env:
  82. - name: TZ
  83. value: US/Michigan
  84. - name: MEMORY
  85. value: "3G"
  86. # max tick time is default 60.0 seconds (60000 here), -1 to disable
  87. - name: MAX_TICK_TIME
  88. value: "-1"
  89. - name: MAX_PLAYERS
  90. value: "6"
  91. - name: VERSION
  92. value: "1.19.2"
  93. - name: EULA
  94. value: "TRUE"
  95. - name: CF_API_KEY
  96. value: "$$2a$$10$$JU91aPtRDMOid0cAfwDGwuk3IETckr93LyV/zW3Xfz49TrT0PoiYy"
  97. - name: TYPE
  98. value: "FORGE"
  99. # - name: GENERIC_PACK
  100. # value: "lol.zip"
  101. # - name: TYPE
  102. # value: "AUTO_CURSEFORGE"
  103. # - name: CF_MODPACK_ZIP
  104. # value: "lol.zip"
  105. # Values below this line will likely have no effect.
  106. # Update the configuration in the data directory instead
  107. - name: MOTD
  108. value: "Enjoy MonkeyBOX!"
  109. - name: OPS
  110. value: "Aspectra7495"
  111. - name: RCON_PASSWORD
  112. value: "0202"
  113. - name: ANNOUNCE_PLAYER_ACHIEVEMENTS
  114. value: "true"
  115. - name: MODE
  116. value: "survival"
  117. - name: SERVER_NAME
  118. value: "monkeybox"
  119. - name: STOP_SERVER_ANNOUNCE_DELAY
  120. value: "60"
  121. - name: ENABLE_ROLLING_LOGS
  122. value: "true"
  123. ports:
  124. - containerPort: 25575
  125. - containerPort: 25565
  126. resources:
  127. limits:
  128. memory: "8192Mi"
  129. cpu: "8000m"
  130. requests:
  131. memory: "3384Mi"
  132. cpu: "2000m"
  133. volumeMounts:
  134. - mountPath: /data
  135. name: minecraft-data
  136. restartPolicy: Always
  137. volumes:
  138. - name: minecraft-data
  139. persistentVolumeClaim:
  140. claimName: minecraft-data
  141. status: {}
  142. #---
  143. ## Hosting
  144. #apiVersion: networking.k8s.io/v1
  145. #kind: Ingress
  146. #metadata:
  147. # name: minecraft-ingress
  148. # annotations:
  149. # cert-manager.io/cluster-issuer: "letsencrypt-prod"
  150. # ## No basic auth for minecraft
  151. # ## type of authentication
  152. # #nginx.ingress.kubernetes.io/auth-type: basic
  153. # ## name of the secret that contains the user/password definitions
  154. # #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  155. # ## message to display with an appropriate context why the authentication is required
  156. # #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  157. #spec:
  158. # tls:
  159. # - hosts:
  160. # - minecraft.monkeybox.org
  161. # secretName: minecraft-tls
  162. # rules:
  163. # - host: minecraft.monkeybox.org
  164. # http:
  165. # paths:
  166. # - path: /
  167. # pathType: Prefix
  168. # backend:
  169. # service:
  170. # name: minecraft
  171. # port:
  172. # number: 80