apiVersion: apps/v1
kind: StatefulSet
metadata:
name: minio
spec:
replicas: 1
serviceName: minio
selector:
matchLabels:
name: minio
template:
metadata:
labels:
name: minio
spec:
containers:
- name: minio
image: minio/minio:RELEASE.2021-06-17T00-10-46Z
imagePullPolicy: IfNotPresent
args:
- server
- /data
ports:
- containerPort: 9000
env:
- name: MINIO_ROOT_USER
value: "minioadmin"
- name: MINIO_ROOT_PASSWORD
value: "minioadmin"
resources:
limits:
memory: "2048Mi"
cpu: "1000m"
requests:
memory: "2048Mi"
cpu: "1000m"
volumeMounts:
- name: minio-data-one
mountPath: /data
imagePullSecrets:
- name: minio
volumes:
- name: minio-data-one
hostPath:
path: /data/minio
type: DirectoryOrCreate
---
kind: Service
apiVersion: v1
metadata:
name: minio
spec:
type: NodePort
ports:
- name: minio-server
port: 9000
targetPort: 9000
nodePort: 32000
protocol: TCP
selector:
name: minio
---