Created
March 9, 2020 18:31
-
-
Save wlan0/81ed5b4d6e8cd60c26a3a2b0a5053cd2 to your computer and use it in GitHub Desktop.
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: StatefulSet | |
metadata: | |
name: minio | |
labels: | |
app: minio | |
spec: | |
serviceName: minio | |
podManagementPolicy: Parallel | |
replicas: 4 | |
selector: | |
matchLabels: | |
app: minio # has to match .spec.template.metadata.labels | |
template: | |
metadata: | |
labels: | |
app: minio # has to match .spec.selector.matchLabels | |
spec: | |
affinity: | |
podAntiAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
- labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- minio | |
topologyKey: "kubernetes.io/hostname" | |
# initContainers: | |
# - name: clean-dir | |
# image: busybox:1.28 | |
# command: ['sh', '-c', 'rm -rf /data/* && rm -rf /data/.minio.sys'] | |
containers: | |
- name: minio | |
env: | |
- name: MINIO_ACCESS_KEY | |
value: "minio" | |
- name: MINIO_SECRET_KEY | |
value: "minio123" | |
image: wlan0/minio.dev | |
imagePullPolicy: Always | |
args: | |
- server | |
- http://minio-{0...3}.minio.default.svc.cluster.local/data | |
ports: | |
- containerPort: 9000 | |
# These volume mounts are persistent. Each pod in the PetSet | |
# gets a volume mounted based on this field. | |
# volumeMounts: | |
# - name: data | |
# mountPath: /data | |
# 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 | |
# Readiness probe detects situations where MinIO server instance | |
# is not ready to accept connections. Kubernetes automatically | |
# stops all the traffic to the pods if readiness checks fail. | |
# readinessProbe: | |
# httpGet: | |
# path: /minio/health/ready | |
# port: 9000 | |
# initialDelaySeconds: 120 | |
# periodSeconds: 20 | |
volumes: | |
- name: data | |
hostPath: | |
# directory location of NAS volume on host | |
path: /mnt/nas/volume/ | |
# the volume must already exist | |
type: Directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment