编写一份minio的yaml文件,用于k8s上对minio的部署
时间: 2024-01-25 20:58:24 浏览: 156
k8s上部署minio 14.8.5 存储
我可以回答这个问题,以下是一个用于在k8s上部署minio的yaml文件示例:
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
spec:
replicas: 1
selector:
matchLabels:
app: minio
template:
metadata:
labels:
app: minio
spec:
containers:
- name: minio
image: minio/minio:RELEASE.2021-06-17T18-19-52Z
args:
- server
- /data
env:
- name: MINIO_ACCESS_KEY
value: minio_access_key
- name: MINIO_SECRET_KEY
value: minio_secret_key
ports:
- containerPort: 9000
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: minio-pvc
---
apiVersion: v1
kind: Service
metadata:
name: minio
spec:
selector:
app: minio
ports:
- name: http
port: 9000
protocol: TCP
targetPort: 9000
type: ClusterIP
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
阅读全文