apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio-deployment
spec:
  selector:
    matchLabels:
      app: minio
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: minio
    spec:
      volumes:
      - name: storage
        persistentVolumeClaim:
          claimName: minio
      containers:
      - name: minio
        image: minio/minio:latest
        args:
        - server 
        - /storage 
        #- --console-address ":9001"
        env:
        - name: MINIO_ROOT_USER
          value: "minio"
        - name: MINIO_ROOT_PASSWORD
          value: "minio123"
        - name: MINIO_REGION_NAME
          value: "eu-central-1"
        ports:
        - containerPort: 9000
        volumeMounts:
        - name: storage # must match the volume name, above
          mountPath: "/storage"