Created
June 8, 2020 02:37
-
-
Save harshavardhana/bab9dc72498846625eb18f67ca2fc901 to your computer and use it in GitHub Desktop.
This file contains 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
## Create service of minio dist xl StatefulSet. | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: minio | |
spec: | |
type: NodePort | |
ports: | |
- port: 9000 | |
selector: | |
app: minio-app |
This file contains 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
## Create headless service to StatefulSet to work. | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: minio-headless | |
labels: | |
app: minio-headless | |
spec: | |
ports: | |
- port: 9000 | |
clusterIP: None | |
selector: | |
app: minio-app | |
--- | |
## Run minio dist xl StatefulSet. | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: minio | |
spec: | |
serviceName: "minio-headless" | |
replicas: 4 | |
selector: | |
matchLabels: | |
app: minio-app | |
template: | |
metadata: | |
labels: | |
app: minio-app | |
spec: | |
containers: | |
- name: minio | |
env: | |
- name: MINIO_ACCESS_KEY | |
value: "minio" | |
- name: MINIO_SECRET_KEY | |
value: "minio123" | |
image: minio/minio:latest | |
imagePullPolicy: Always | |
args: | |
- server | |
- http://minio-0.minio-headless.default.svc.cluster.local/data | |
- http://minio-1.minio-headless.default.svc.cluster.local/data | |
- http://minio-2.minio-headless.default.svc.cluster.local/data | |
- http://minio-3.minio-headless.default.svc.cluster.local/data | |
ports: | |
- containerPort: 9000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment