apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
  labels:
    example: rust-web-template
spec:
  selector:
    matchLabels:
      app: minio
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: minio
    spec:
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: minio-pvc
      containers:
        - name: minio
          volumeMounts:
            - name: data
              mountPath: "/data"
          image: minio/minio:latest
          args:
            - server
            - /data
          env:
            - name: MINIO_ACCESS_KEY
              value: "AKIAIOSFODNN7EXAMPLE"
            - name: MINIO_SECRET_KEY
              value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
          ports:
            - containerPort: 9000
          readinessProbe:
            httpGet:
              path: /minio/health/ready
              port: 9000
            initialDelaySeconds: 120
            periodSeconds: 20
          livenessProbe:
            httpGet:
              path: /minio/health/live
              port: 9000
            initialDelaySeconds: 120
            periodSeconds: 20
