apiVersion: apps/v1
kind: Deployment
metadata:
  name: minecraft
  namespace: minecraft
spec:
  replicas: 1
  selector:
    matchLabels:
      app: minecraft
  template:
    metadata:
      labels:
        app: minecraft
    spec:
      securityContext:
        fsGroup: 1013
      imagePullSecrets:
      - name: regcred
      containers:
      - name: minecraft
        image: itzg/minecraft-bedrock-server
        resources:
          requests:
            cpu: 500m
            memory: 5Gi
        ports:
          - containerPort: 19132 
            name: serverport
        env:
        - name: EULA
          value: "TRUE"
        volumeMounts:
        - name: data
          mountPath: /data
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: minecraft-data-pvc



