Kubernetes部署MINIO对象存储管理
minio对象存储管理,支持创建Bucket,文件上传、删除、分享、下载,同时可以对Bucket设置读写权限。
Docker直接安装
pvc minio-data minio-config
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-data
namespace: sre
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: "250Gi"
volumeName:
storageClassName: nfs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-config
namespace: sre
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: "250Gi"
volumeName:
storageClassName: nfs
Deployment minio-server
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio-server
namespace: sre
labels:
app: minio-server
spec:
selector:
matchLabels:
app: minio-server
template:
metadata:
labels:
app: minio-server
spec:
containers:
- name: minio-server
image: minio/minio
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9000
name: minio
env:
- name: MINIO_ACCESS_KEY
value: admin
- name: MINIO_SECRET_KEY
value: admin123456
command:
- /bin/sh
- -c
- |
/usr/bin/minio server /data
volumeMounts:
- name: minio-data
mountPath: /data
- name: minio-config
mountPath: /root/.minio
volumes:
- name: minio-data
persistentVolumeClaim:
claimName: minio-data
- name: minio-config
persistentVolumeClaim:
claimName: minio-config
svc minio-server
apiVersion: v1
kind: Service
metadata:
name: minio-server
namespace: sre
spec:
type: NodePort
ports:
- name: minio
protocol: TCP
port: 9000
nodePort: 30011
targetPort: http
selector:
app: minio-server
通过浏览器访问http://minio.my.com地址,使用指定的 MINIO_ACCESS_KEY 及 MINIO_SECRET_KEY登录即可。