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
---
minio老版本集成到k8s的yaml
最新推荐文章于 2024-11-03 11:01:20 发布
该文档描述了一个KubernetesStatefulSet配置,用于部署MinIO对象存储服务。设置包括1个副本,使用NodePort类型的服务暴露在32000端口,环境变量定义了默认的用户名和密码,且设定了内存和CPU资源限制。数据存储在hostPath类型的volume上。
摘要由CSDN通过智能技术生成