apiVersion: apps/v1
kind: Deployment
metadata:
  name: minecraft
  labels:
    app: minecraft
spec:
  replicas: 1
  selector:
    matchLabels:
      app: minecraft
  template:
    metadata:
      labels:
        app: minecraft
    spec:
      hostNetwork: true
      containers:
      - name: minecraft
        image: localhost:32000/minecraft:1.18.1
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - mountPath: /server
          name: minecraft-volume
        ports:
        - containerPort: 25565
      volumes:
      - name: minecraft-volume
        hostPath:
          path: /data/minecraft
          type: DirectoryOrCreate
