2017-05-04 22:30:46 -04:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
# This name uniquely identifies the Deployment
|
2017-12-11 23:59:00 -05:00
|
|
|
name: minio
|
2017-05-04 22:30:46 -04:00
|
|
|
spec:
|
|
|
|
strategy:
|
2017-12-11 23:59:00 -05:00
|
|
|
# Specifies the strategy used to replace old Pods by new ones
|
|
|
|
# Refer: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
2017-05-04 22:30:46 -04:00
|
|
|
type: Recreate
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-12-11 23:59:00 -05:00
|
|
|
# This label is used as a selector in Service definition
|
2017-05-04 22:30:46 -04:00
|
|
|
app: minio
|
|
|
|
spec:
|
2017-12-11 23:59:00 -05:00
|
|
|
# Volumes used by this deployment
|
2017-05-04 22:30:46 -04:00
|
|
|
volumes:
|
2017-09-14 22:17:42 -04:00
|
|
|
- name: data
|
2017-12-11 23:59:00 -05:00
|
|
|
# This volume is based on PVC
|
2017-05-04 22:30:46 -04:00
|
|
|
persistentVolumeClaim:
|
|
|
|
# Name of the PVC created earlier
|
|
|
|
claimName: minio-pv-claim
|
|
|
|
containers:
|
|
|
|
- name: minio
|
2017-12-11 23:59:00 -05: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-07-17 18:59:33 -04:00
|
|
|
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
|
2017-05-04 22:30:46 -04:00
|
|
|
args:
|
|
|
|
- server
|
2017-09-14 22:17:42 -04:00
|
|
|
- /data
|
2017-05-04 22:30:46 -04:00
|
|
|
env:
|
2019-04-09 14:39:42 -04:00
|
|
|
# MinIO access key and secret key
|
2017-05-04 22:30:46 -04:00
|
|
|
- name: MINIO_ACCESS_KEY
|
|
|
|
value: "minio"
|
|
|
|
- name: MINIO_SECRET_KEY
|
|
|
|
value: "minio123"
|
|
|
|
ports:
|
|
|
|
- containerPort: 9000
|
2019-04-09 14:39:42 -04:00
|
|
|
# Readiness probe detects situations when MinIO server instance
|
2018-03-15 00:25:02 -04: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-09 14:39:42 -04:00
|
|
|
# Liveness probe detects situations where MinIO server instance
|
2018-03-15 00:25:02 -04: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
|