minio提供对象存储,其自身须要在块存储上,这里应用ceph作为块存储。
- 在ceph上创立pvc给minio应用,作为minio的存储后端:
应用storageclass创立pvc:
# cat minio-pvc.yamlapiVersion: v1kind: PersistentVolumeClaimmetadata: name: minio-pvc namespace: miniospec: storageClassName: rook-ceph-block accessModes: - ReadWriteOnce resources: requests: storage: 50Gi
- 部署minio depolyment
部署的mini应用上一步创立的pvc:minio-pvc作为/data;
minio WEB的默认用户名/明码: minio/minio123
# cat minio-deploy.yamlapiVersion: apps/v1kind: Deploymentmetadata: name: minio namespace: miniospec: 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.yamlapiVersion: v1kind: Servicemetadata: name: minio namespace: miniospec: ports: - port: 9000 targetPort: 9000 nodePort: 32600 selector: app: minio type: NodePort
应用NodePort:32600和上一步的用户名、明码就能够登录minio的dashboard:
- 在mino上创立bucket提供给thanos应用