Merge "Add MinIO Server with Kubernetes deployment" into dev/icn-v0.2.0
[icn.git] / deploy / kud-plugin-addons / minio / minio-deployment.yaml
diff --git a/deploy/kud-plugin-addons/minio/minio-deployment.yaml b/deploy/kud-plugin-addons/minio/minio-deployment.yaml
new file mode 100644 (file)
index 0000000..373ba55
--- /dev/null
@@ -0,0 +1,44 @@
+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-deployment
+spec:
+  selector:
+    matchLabels:
+      app: minio
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        # Label is used as selector in the service.
+        app: minio
+    spec:
+      # Refer to the PVC created earlier
+      volumes:
+      - name: storage
+        persistentVolumeClaim:
+          # Name of the PVC created earlier
+          claimName: minio-local-claim
+      containers:
+      - name: minio
+        # Pulls the default Minio image from Docker Hub
+        image: minio/minio:latest
+        args:
+        - server
+        - /storage
+        env:
+        # Minio access key and secret key
+        - name: MINIO_ACCESS_KEY
+          value: "ICN-ACCESSKEYID"
+        - name: MINIO_SECRET_KEY
+          value: "ICN-SECRETACCESSKEY"
+        ports:
+        - containerPort: 9000
+          hostPort: 9000
+        # Mount the volume into the pod
+        volumeMounts:
+        - name: storage # must match the volume name, above
+          mountPath: "/storage"
+