| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  | apiVersion: extensions/v1beta1
 | 
					
						
							|  |  |  | kind: Deployment
 | 
					
						
							|  |  |  | metadata:
 | 
					
						
							|  |  |  |   # This name uniquely identifies the Deployment
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |   name: minio
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  | spec:
 | 
					
						
							|  |  |  |   strategy:
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |     # Specifies the strategy used to replace old Pods by new ones
 | 
					
						
							|  |  |  |     # Refer: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |     type: Recreate
 | 
					
						
							|  |  |  |   template:
 | 
					
						
							|  |  |  |     metadata:
 | 
					
						
							|  |  |  |       labels:
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |         # This label is used as a selector in Service definition
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         app: minio
 | 
					
						
							|  |  |  |     spec:
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |       # Volumes used by this deployment
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |       volumes:
 | 
					
						
							| 
									
										
										
										
											2017-09-15 10:17:42 +08:00
										 |  |  |       - name: data
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |         # This volume is based on PVC
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         persistentVolumeClaim:
 | 
					
						
							|  |  |  |           # Name of the PVC created earlier
 | 
					
						
							|  |  |  |           claimName: minio-pv-claim
 | 
					
						
							|  |  |  |       containers:
 | 
					
						
							|  |  |  |       - name: minio
 | 
					
						
							| 
									
										
										
										
											2017-12-12 12:59:00 +08:00
										 |  |  |         # Volume mounts for this container
 | 
					
						
							|  |  |  |         volumeMounts:
 | 
					
						
							|  |  |  |         # Volume 'data' is mounted to path '/data'
 | 
					
						
							|  |  |  |         - name: data 
 | 
					
						
							|  |  |  |           mountPath: "/data"
 | 
					
						
							|  |  |  |         # Pulls the lastest Minio image from Docker Hub
 | 
					
						
							| 
									
										
										
										
											2019-04-24 07:55:31 +08:00
										 |  |  |         image: minio/minio:RELEASE.2019-04-23T23-50-36Z
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         args:
 | 
					
						
							|  |  |  |         - server
 | 
					
						
							| 
									
										
										
										
											2017-09-15 10:17:42 +08:00
										 |  |  |         - /data
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         env:
 | 
					
						
							| 
									
										
										
										
											2019-04-10 02:39:42 +08:00
										 |  |  |         # MinIO access key and secret key
 | 
					
						
							| 
									
										
										
										
											2017-05-05 10:30:46 +08:00
										 |  |  |         - name: MINIO_ACCESS_KEY
 | 
					
						
							|  |  |  |           value: "minio"
 | 
					
						
							|  |  |  |         - name: MINIO_SECRET_KEY
 | 
					
						
							|  |  |  |           value: "minio123"
 | 
					
						
							|  |  |  |         ports:
 | 
					
						
							|  |  |  |         - containerPort: 9000
 | 
					
						
							| 
									
										
										
										
											2019-04-10 02:39:42 +08:00
										 |  |  |         # Readiness probe detects situations when MinIO server instance
 | 
					
						
							| 
									
										
										
										
											2018-03-15 12:25:02 +08:00
										 |  |  |         # is not ready to accept traffic. Kubernetes doesn't forward
 | 
					
						
							|  |  |  |         # traffic to the pod while readiness checks fail.
 | 
					
						
							|  |  |  |         readinessProbe:
 | 
					
						
							|  |  |  |           httpGet:
 | 
					
						
							|  |  |  |             path: /minio/health/ready
 | 
					
						
							|  |  |  |             port: 9000
 | 
					
						
							|  |  |  |           initialDelaySeconds: 120
 | 
					
						
							|  |  |  |           periodSeconds: 20
 | 
					
						
							| 
									
										
										
										
											2019-04-10 02:39:42 +08:00
										 |  |  |         # Liveness probe detects situations where MinIO server instance
 | 
					
						
							| 
									
										
										
										
											2018-03-15 12:25:02 +08:00
										 |  |  |         # is not working properly and needs restart. Kubernetes automatically
 | 
					
						
							|  |  |  |         # restarts the pods if liveness checks fail.
 | 
					
						
							|  |  |  |         livenessProbe:
 | 
					
						
							|  |  |  |           httpGet:
 | 
					
						
							|  |  |  |             path: /minio/health/live
 | 
					
						
							|  |  |  |             port: 9000
 | 
					
						
							|  |  |  |           initialDelaySeconds: 120
 | 
					
						
							|  |  |  |           periodSeconds: 20
 |