说明minio(AIStor)社区闭源版。单节点每节点双驱动器。注意社区版最新免费版本最高配置仅支持单节点每节点双驱动器。其他功能都是付费版才能使用。综合来说若是商用推荐选付费版。若是开发测试推荐旧版。完全没必要用阉割的新版做完整测试。申请license访问https://www.min.io/pricing申请免费license。配置namesapcekubectl create namespace aistor配置licensekubectl-naistor create secret generic aistor-minio-license --from-fileminio.license./minio.license修改配置文件---# # 2. Secret: 管理员账号密码替代明文环境变量# 生成命令示例# echo -n 你的管理员账号 | base64# echo -n 你的强密码 | base64# 注意必须加 -n 避免换行符导致密码错误# apiVersion: v1 kind: Secret metadata: name: aistor-minio-credentials namespace: aistor type: Opaque data:# 替换为 base64 编码后的账号默认示例为 minioadminroot-user:bWluaW9hZG1pbg# 替换为 base64 编码后的密码默认示例为 minioadminroot-password:bWluaW9hZG1pbg---# # 2. ConfigMap: 存储证书目录内容可选# 若证书含私钥建议合并到上方Secret中# apiVersion: v1 kind: ConfigMap metadata: name: aistor-minio-certs namespace: aistor data:{}# 示例证书格式# public.crt: |# -----BEGIN CERTIFICATE-----# ...# -----END CERTIFICATE-----# private.key: |# -----BEGIN PRIVATE KEY-----# ...# -----END PRIVATE KEY--------# # 3. Headless Service: StatefulSet 内部 DNS 发现# 用于 MinIO 分布式节点间互相通信# apiVersion: v1 kind: Service metadata: name: aistor-minio-hl namespace: aistor labels: app: aistor-minio spec: clusterIP: None selector: app: aistor-minio ports: - name: api port:9000targetPort:9000- name: console port:9001targetPort:9001---# # 4. NodePort Service: 对外暴露服务# apiVersion: v1 kind: Service metadata: name: aistor-minio-nodeport namespace: aistor labels: app: aistor-minio spec: type: NodePort selector: app: aistor-minio ports: - name: api port:9000targetPort:9000# nodePort: 30000 # API 对外端口范围 30000-32767- name: console port:9001targetPort:9001# nodePort: 30001 # 控制台对外端口范围 30000-32767---# # 5. StatefulSet: 免费版最高配置只能选单节点双驱动器# apiVersion: apps/v1 kind: StatefulSet metadata: name: aistor-minio namespace: aistor labels: app: aistor-minio spec: serviceName: aistor-minio-hl# 关键免费license仅支持单节点副本数固定为1replicas:1selector: matchLabels: app: aistor-minio template: metadata: labels: app: aistor-minio spec: terminationGracePeriodSeconds:60containers: - name: minio image: quay.io/minio/aistor/minio:latest# 单节点多驱动器模式直接列出本地数据目录不使用分布式http地址command: - minio - server - /mnt/data-0 - /mnt/data-1 - --console-address -:9001---license- /minio.license ports: - name: api containerPort:9000- name: console containerPort:9001env: - name: MINIO_ROOT_USER valueFrom: secretKeyRef: name: aistor-minio-credentials key: root-user - name: MINIO_ROOT_PASSWORD valueFrom: secretKeyRef: name: aistor-minio-credentials key: root-password livenessProbe: httpGet: path: /minio/health/live port:9000initialDelaySeconds:5periodSeconds:30timeoutSeconds:10failureThreshold:3readinessProbe: httpGet: path: /minio/health/ready port:9000initialDelaySeconds:5periodSeconds:15timeoutSeconds:5resources: limits: cpu:2memory:4Girequests: cpu:500mmemory:1GivolumeMounts: - name:># 双持久化卷单节点下对应两块独立数据盘volumeClaimTemplates: - metadata: name:>[ReadWriteOnce]# storageClassName: openebs-hostpathresources: requests: storage: 100Gi - metadata: name:>[ReadWriteOnce]# storageClassName: openebs-hostpathresources: requests: storage: 100Gi部署kubectl apply-faistor.yaml