helm部署分布式minio

1、添加helm repo

helm repo add minio-repo https://charts.bitnami.com/bitnami
helm repo update
helm fetch minio-repo/minio --untar
cp minio/values.yaml .

2、部署

helm -n sre install minio minio-repo/minio \
--set mode="distributed" \
--set auth.rootUser=admin \
--set auth.rootPassword="duanshuaixingPassw0rd" \
--set accessKey=duanshuaxing-ak \
--set secretKey=dunashuaixing-sk-env \
--set-string env.MINIO_ACCESS_KEY=dunashuaixing-access-key \
--set-string env.MINIO_SECRET_KEY=dunashuaixing-secret-key \
--set persistence.enabled=true \
--set persistence.storageClass="local-path" \
--set persistence.size=200G \
--set statefulset.replicaCount=4 \
--set resources.limits.cpu=1 \
--set resources.limits.memory=1Gi \
--set resources.requests.cpu=200m \
--set resources.requests.memory=200Mi
NAME: minio
LAST DEPLOYED: Tue Mar 19 14:50:50 2024
NAMESPACE: sre
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: minio
CHART VERSION: 14.1.0
APP VERSION: 2024.3.15

** Please be patient while the chart is being deployed **

MinIO® can be accessed via port  on the following DNS name from within your cluster:

   minio.sre.svc.cluster.local

To get your credentials run:

   export ROOT_USER=$(kubectl get secret --namespace sre minio -o jsonpath="{.data.root-user}" | base64 -d)
   export ROOT_PASSWORD=$(kubectl get secret --namespace sre minio -o jsonpath="{.data.root-password}" | base64 -d)

To connect to your MinIO® server using a client:

- Run a MinIO® Client pod and append the desired command (e.g. 'admin info'):

   kubectl run --namespace sre minio-client \
     --rm --tty -i --restart='Never' \
     --env MINIO_SERVER_ROOT_USER=$ROOT_USER \
     --env MINIO_SERVER_ROOT_PASSWORD=$ROOT_PASSWORD \
     --env MINIO_SERVER_HOST=minio \
     --image docker.io/bitnami/minio-client:2024.3.9-debian-12-r0 -- admin info minio

To access the MinIO® web UI:

- Get the MinIO® URL:

   echo "MinIO® web URL: http://127.0.0.1:9001/minio"
   kubectl port-forward --namespace sre svc/minio 9001:9001

WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
  - resources
+info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

3、配置minio客户端(命令行配置)

mc config host add minio http://minio.sre.svc.cluster.local:9000 duanshuaxing-ak dunashuaixing-sk --api s3v4

4、生成ak/sk MINIO_ACCESS_KEY 和 MINIO_SECRET_KEY

mc config host add minio http://minio.sre.svc.cluster.local:9000 FGXgT3RIEOfCP6J5 INgbX065QkwcSPYT --api s3v4

查看配置
mc config host list
温馨提示: Minio 持久化数据存储不建议使用网络文件系统卷,有可能导致MinIO无法提供一致性保证,若非要使用NFS网络连接存储的部署,请使用NFSv4以获得最佳效果。

mount -l
# 挂载 NFS 时关键参数 vers=4
192.168.86.100:/volume1/storage/ on /app type nfs (rw,relatime,vers=4,rsize=131072

参考:https://blog.csdn.net/lgbisha/article/details/133137331

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值