minio 提供对象存储,其自身须要在块存储上,这里应用 ceph 作为块存储。
- 在 ceph 上创立 pvc 给 minio 应用,作为 minio 的存储后端:
应用 storageclass 创立 pvc:
# cat minio-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pvc
namespace: minio
spec:
storageClassName: rook-ceph-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
- 部署 minio depolyment
部署的 mini 应用上一步创立的 pvc:minio-pvc 作为 /data;
minio WEB 的默认用户名 / 明码: minio/minio123
# cat minio-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
namespace: minio
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
metadata:
labels:
app: minio
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: minio-pvc
containers:
- name: minio
volumeMounts:
- name: data
mountPath: "/data"
image: minio/minio:RELEASE.2021-04-18T19-26-29Z
args:
- server
- /data
env:
- name: MINIO_ACCESS_KEY
value: "minio"
- name: MINIO_SECRET_KEY
value: "minio123"
ports:
- containerPort: 9000
readinessProbe:
httpGet:
path: /minio/health/ready
port: 9000
initialDelaySeconds: 90
periodSeconds: 10
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
initialDelaySeconds: 30
periodSeconds: 10
- 部署 minio service 并提供 NodePort(32600)
# cat minio-svc.yaml
apiVersion: v1
kind: Service
metadata:
name: minio
namespace: minio
spec:
ports:
- port: 9000
targetPort: 9000
nodePort: 32600
selector:
app: minio
type: NodePort
应用 NodePort:32600 和上一步的用户名、明码就能够登录 minio 的 dashboard:
- 在 mino 上创立 bucket 提供给 thanos 应用