--- apiVersion: apps/v1 kind: Deployment metadata: annotations: {} name: minecraft-home namespace: games spec: replicas: 1 selector: matchLabels: app: minecraft-home template: metadata: labels: app: minecraft-home spec: containers: - env: - name: EULA value: 'true' - name: MOTD value: A Minecraft Server Powered by Docker - name: DIFFICULTY value: easy - name: GAMEMODE value: survival - name: MAX_PLAYERS value: '10' - name: ENABLE_COMMAND_BLOCK value: 'true' - name: DUMP_SERVER_PROPERTIES value: 'true' - name: PAUSE_WHEN_EMPTY_SECONDS value: '0' - name: OPS value: LadyGisela5,tomgates24,anutzalizuk,toranaga_samma image: itzg/minecraft-server name: minecraft ports: - containerPort: 25565 protocol: TCP resources: limits: cpu: 2000m memory: 2Gi requests: cpu: 500m memory: 1Gi volumeMounts: - mountPath: /data name: data nodeSelector: topology.homelab/server: dell volumes: - name: data persistentVolumeClaim: claimName: minecraft-home-v2-pvc --- apiVersion: v1 kind: Service metadata: annotations: {} name: minecraft-home namespace: games spec: ports: - port: 25565 protocol: TCP targetPort: 25565 selector: app: minecraft-home type: NodePort ports: - port: 25565 protocol: TCP targetPort: 25565 nodePort: 31112 --- apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: {} name: minecraft-home-v2-pvc namespace: games spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: nfs-minecraft