在k8s集群部署MinIO(AIStor)免费社区版,闭源,单副本单节点

发布时间:2026/7/3 17:46:43
在k8s集群部署MinIO(AIStor)免费社区版,闭源,单副本单节点 说明部署MinIO闭源版最新版本现改名为AIStor。单副本单节点。获取license访问https://www.min.io/pricing获取免费或者付费的license 文件。若是付费直接部署商用版若是免费社区版可以参考本方法部署。修改配置minio.yaml是豆包提供的配置apiVersion: v1 kind: PersistentVolumeClaim metadata: name: minio-data-pvc spec: accessModes: - ReadWriteOnce storageClassName:localresources: requests: storage: 50Gi ---# Service - ClusterIP 类型集群内部访问apiVersion: v1 kind: Service metadata: name: minio-clusterip spec: type: ClusterIP selector: app: minio-aistor ports: - name: api port:9000targetPort:9000- name: console port:9001targetPort:9001---# Service - NodePort 类型节点外部访问apiVersion: v1 kind: Service metadata: name: minio-nodeport spec: type: NodePort selector: app: minio-aistor ports: - name: api port:9000targetPort:9000# nodePort: 30000 # 自定义 API 访问端口30000-32767- name: console port:9001targetPort:9001# nodePort: 30001 # 自定义控制台端口--- apiVersion: apps/v1 kind: Deployment metadata: name: minio-aistor labels: app: minio-aistor spec: replicas:1selector: matchLabels: app: minio-aistor template: metadata: labels: app: minio-aistor spec: restartPolicy: Always containers: - name: minio-server image: quay.io/minio/aistor/minio:latest imagePullPolicy: IfNotPresent# 端口映射ports: - containerPort:9000- containerPort:9001# 挂载卷数据、证书、授权文件volumeMounts: - name: minio-data mountPath: /mnt/data# - name: minio-certs# mountPath: /etc/minio/certs- name: minio-license mountPath: /minio.license subPath: minio.license# 关键直接挂载文件# 启动命令与原配置一致command: - minio - server - /mnt/data ---license- /minio.license# 健康检查livenessProbe: httpGet: path: /minio/health/live port:9000initialDelaySeconds:5periodSeconds:30timeoutSeconds:10failureThreshold:3# 资源限制可选resources: requests: memory:2Gicpu:1000mlimits: memory:4Gicpu:2000m# 卷定义volumes: - name: minio-data persistentVolumeClaim: claimName: minio-data-pvc# - name: minio-certs# persistentVolumeClaim:# claimName: minio-certs-pvc- name: minio-license secret: secretName: minio-licenseaistor.yaml是Gemini提供的配置---# 1. 内部访问的 ClusterIP ServiceapiVersion: v1 kind: Service metadata: name: aistor-clusterip labels: app: aistor spec: type: ClusterIP ports: - name: api port:9000targetPort:9000- name: console port:9001targetPort:9001selector: app: aistor ---# 2. 外部访问的 NodePort ServiceapiVersion: v1 kind: Service metadata: name: aistor-nodeport labels: app: aistor spec: type: NodePort ports: - name: api port:9000targetPort:9000# nodePort: 30000 # 可根据你集群的 NodePort 范围(通常为 30000-32767)进行修改- name: console port:9001targetPort:9001# nodePort: 30001selector: app: aistor ---# 3. 核心应用: StatefulSetapiVersion: apps/v1 kind: StatefulSet metadata: name: aistor-server spec: serviceName:aistor-clusteripreplicas:1selector: matchLabels: app: aistor template: metadata: labels: app: aistor spec: containers: - name: aistor-server image: quay.io/minio/aistor/minio:latest imagePullPolicy: IfNotPresent# 使用数组格式定义命令并将挂载路径对齐到 Secret 的挂载点command: - minio - server - /mnt/data ---license- /minio/license/minio.license ports: - containerPort:9000name: api - containerPort:9001name: console# 将 Compose 的 healthcheck 转换为原生的 Liveness 和 Readiness 探针livenessProbe: httpGet: path: /minio/health/live port:9000initialDelaySeconds:5periodSeconds:30timeoutSeconds:10failureThreshold:3readinessProbe: httpGet: path: /minio/health/live port:9000initialDelaySeconds:5periodSeconds:10failureThreshold:3volumeMounts: - name: aistor-data mountPath: /mnt/data - name: license-volume mountPath: /minio/license readOnly:truevolumes:# 引用我们在第一步创建的 Secret- name: license-volume secret: secretName: aistor-license# 动态持久卷声明 (PVC)volumeClaimTemplates: - metadata: name: aistor-data spec: accessModes:[ReadWriteOnce]storageClassName:local# 绑定你现有的 local StorageClassresources: requests: storage: 100Gi# 注意请务必根据实际磁盘规划修改此容量可发给AI辅助你调整配置。部署若使用minio.yamlkubectl create ns minio kubectl create secret generic minio-license --from-fileminio.license./minio.license-nminio kubectl apply-fminio.yaml-nminio若使用aistor.yamlkubectl create namespace aistor kubectl create secret generic aistor-license --from-fileminio.license./minio.license-naistor kubectl apply-faistor.yaml-naistor访问首次访问账户密码都是minioadmin