mirror of
https://github.com/minio/minio.git
synced 2025-01-04 19:43:21 -05:00
ba0c7544ea
- Remove hostPort from Kubernetes deployment example docs. Initially hostPort was added to ensure Minio pods are allocated to separate machines, but as per latest Kubernetes documents this is not recommended approach (ref: https://kubernetes.io/docs/concepts/ configuration/overview/#services). To define pod allocations, Affinity and Anti-Affinity concepts are the recommended approach. (ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node) - Add Minio release tag to Docker-Compose example file.
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
apiVersion: apps/v1beta1
|
|
kind: StatefulSet
|
|
metadata:
|
|
# This name uniquely identifies the StatefulSet
|
|
name: minio
|
|
spec:
|
|
serviceName: minio
|
|
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:
|
|
containers:
|
|
- name: minio
|
|
env:
|
|
- name: MINIO_ACCESS_KEY
|
|
value: "minio"
|
|
- name: MINIO_SECRET_KEY
|
|
value: "minio123"
|
|
image: minio/minio:RELEASE.2018-02-09T22-40-05Z
|
|
args:
|
|
- server
|
|
- http://minio-0.minio.default.svc.cluster.local/data
|
|
- http://minio-1.minio.default.svc.cluster.local/data
|
|
- http://minio-2.minio.default.svc.cluster.local/data
|
|
- http://minio-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
|
|
# These are converted to volume claims by the controller
|
|
# and mounted at the paths mentioned above.
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|