Add MinIO Server with Kubernetes deployment
[icn.git] / deploy / kud-plugin-addons / minio / minio-deployment.yaml
1 apiVersion: apps/v1 #  for k8s versions before 1.9.0 use apps/v1beta2  and before 1.8.0 use extensions/v1beta1
2 kind: Deployment
3 metadata:
4   # This name uniquely identifies the Deployment
5   name: minio-deployment
6 spec:
7   selector:
8     matchLabels:
9       app: minio
10   strategy:
11     type: Recreate
12   template:
13     metadata:
14       labels:
15         # Label is used as selector in the service.
16         app: minio
17     spec:
18       # Refer to the PVC created earlier
19       volumes:
20       - name: storage
21         persistentVolumeClaim:
22           # Name of the PVC created earlier
23           claimName: minio-local-claim
24       containers:
25       - name: minio
26         # Pulls the default Minio image from Docker Hub
27         image: minio/minio:latest
28         args:
29         - server
30         - /storage
31         env:
32         # Minio access key and secret key
33         - name: MINIO_ACCESS_KEY
34           value: "ICN-ACCESSKEYID"
35         - name: MINIO_SECRET_KEY
36           value: "ICN-SECRETACCESSKEY"
37         ports:
38         - containerPort: 9000
39           hostPort: 9000
40         # Mount the volume into the pod
41         volumeMounts:
42         - name: storage # must match the volume name, above
43           mountPath: "/storage"
44