apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 kind: Deployment metadata: # This name uniquely identifies the Deployment name: minio spec: selector: matchLabels: app: minio strategy: type: Recreate template: metadata: labels: # Label is used as selector in the service. app: minio spec: volumes: - name: storage persistentVolumeClaim: claimName: minio containers: - name: minio image: minio/minio:latest command: ["sh"] args: - "-c" - "mkdir -p /storage/parcoursmob && minio server /storage --console-address=:9001" env: - name: MINIO_ACCESS_KEY value: "minio" - name: MINIO_SECRET_KEY value: "minio123" ports: - name: api containerPort: 9000 hostPort: 9000 - name: webui containerPort: 9001 hostPort: 9001 volumeMounts: - name: storage mountPath: "/storage"