Created
May 8, 2020 05:24
-
-
Save vamsijakkula/c9b39cfd3d87fe85a298ce7d73625323 to your computer and use it in GitHub Desktop.
Minio Deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
# This name uniquely identifies the Deployment | |
name: minio | |
spec: | |
selector: | |
matchLabels: | |
app: minio # has to match .spec.template.metadata.labels | |
strategy: | |
# Specifies the strategy used to replace old Pods by new ones | |
# Refer: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
# This label is used as a selector in Service definition | |
app: minio | |
spec: | |
# Volumes used by this deployment | |
volumes: | |
- name: data | |
# This volume is based on PVC | |
persistentVolumeClaim: | |
# Name of the PVC created earlier | |
claimName: minio-pv-claim | |
containers: | |
- name: minio | |
# 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 | |
image: minio/minio:RELEASE.2020-05-01T22-19-14Z | |
args: | |
- server | |
- /data | |
env: | |
# MinIO access key and secret key | |
- name: MINIO_ACCESS_KEY | |
value: "minio" | |
- name: MINIO_SECRET_KEY | |
value: "minio123" | |
ports: | |
- containerPort: 9000 | |
# Readiness probe detects situations when MinIO server instance | |
# 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 | |
# Liveness probe detects situations where MinIO server instance | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment