以下示例在 1 Mster + 2 Worker 的 Kubernetes 集群上快速部署使用 MinIO 存储
values.yamlmode: distributed
replicas: 4 drivesPerNode: 1
rootUser: admin rootPassword: gLsSbu7dv4zXSjYUeQrVOFq6
persistence: enabled: true size: 200Gi storageClass: ""
resources: requests: memory: 512Mi cpu: 500m
affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchLabels: app: minio topologyKey: kubernetes.io/hostname
tolerations: []
topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app: minio
ingress: enabled: true ingressClassName: nginx hosts: - minio-api.example.click
|
新增以下 Ingress 配置用于提供 Console 访问
console-ingress.yamlapiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minio-console namespace: minio annotations: nginx.ingress.kubernetes.io/proxy-body-size: "0" spec: ingressClassName: nginx rules: - host: minio.example.click http: paths: - path: / pathType: Prefix backend: service: name: minio-console port: number: 9001
|
执行以下命令部署 MinIO
helm upgrade minio minio/minio -n minio -f values.yaml
kubectl apply -f console-ingress.yaml
|
部署成功后通过 minio.example.click 登录 Console,管理员用户密码为 values.yaml 中配置的账户密码。