添加Helm倉庫
[root@node1 ~] [root@node1 ~] [root@node1 minio] "minio" has been added to your repositories [root@node1 minio]
搜索并下載MinIO Chart
[root@node1 minio] NAME CHART VERSION APP VERSION DESCRIPTION bitnami/minio 12.8.6 2023.9.16 MinIO(R) is an object storage server, compatibl... minio/minio 8.0.10 master High Performance, Kubernetes Native Object Storage stable/minio 0.5.5 Distributed object storage server built for clo... [root@node1 minio] [root@node1 minio] minio-8.0.10.tgz [root@node1 minio] [root@node1 minio] minio minio-8.0.10.tgz [root@node1 minio]
查看目錄結構
[root@node1 minio] [root@node1 minio] Chart.yaml ci README.md templates values.yaml
創建名稱空間
后面將MinIO集群部署到該名稱空間下
[root@node1 ~] namespace/minio created
創建一個Secret
[root@node1 cert] secret/tls-ssl-minio created [root@node1 cert] NAME TYPE DATA AGE tls-ssl-minio Opaque 2 10s
修改value.yaml中的一些變量值
nameOverride: "" fullnameOverride: "" clusterDomain: cluster.local image: repository: minio/minio tag: RELEASE.2021-02-14T04-01-33Z pullPolicy: IfNotPresent mcImage: repository: minio/mc tag: RELEASE.2021-02-14T04-28-06Z pullPolicy: IfNotPresent helmKubectlJqImage: repository: bskim45/helm-kubectl-jq tag: 3.1.0 pullPolicy: IfNotPresent mode: distributed additionalLabels: [] additionalAnnotations: [] extraArgs: [] DeploymentUpdate: type: RollingUpdate maxUnavailable: 0 maxSurge: 100% StatefulSetUpdate: updateStrategy: RollingUpdate priorityClassName: "" accessKey: "admin" secretKey: "minio123456" certsPath: "/etc/minio/certs/" configPathmc: "/etc/minio/mc/" mountPath: "/export" existingSecret: "" bucketRoot: "" drivesPerNode: 1 replicas: 4 zones: 1 tls: enabled: false certSecret: "" publicCrt: public.crt privateKey: private.key trustedCertsSecret: "" persistence: enabled: true existingClaim: "" storageClass: "rook-ceph-block" VolumeName: "" accessMode: ReadWriteOnce size: 10Gi subPath: "" service: type: NodePort clusterIP: ~ port: 9000 nodePort: 32100 externalIPs: [] annotations: {} imagePullSecrets: [] ingress: enabled: false labels: {} annotations: {} path: / hosts: - chart-example.local tls: [] nodeSelector: {} tolerations: [] affinity: {} securityContext: enabled: true runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 podAnnotations: {} podLabels: {} resources: requests: memory: 4Gi defaultBucket: enabled: false name: bucket policy: none purge: false buckets: [] makeBucketJob: podAnnotations: annotations: securityContext: enabled: false runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 resources: requests: memory: 128Mi updatePrometheusJob: podAnnotations: annotations: securityContext: enabled: false runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 s3gateway: enabled: false replicas: 4 serviceEndpoint: "" accessKey: "" secretKey: "" azuregateway: enabled: false replicas: 4 gcsgateway: enabled: false replicas: 4 gcsKeyJson: "" projectId: "" nasgateway: enabled: false replicas: 4 pv: ~ environment: {} networkPolicy: enabled: false allowExternal: true podDisruptionBudget: enabled: false maxUnavailable: 1 serviceAccount: create: true name: metrics: serviceMonitor: enabled: false additionalLabels: {} relabelConfigs: {} etcd: endpoints: [] pathPrefix: "" corednsPathPrefix: "" clientCert: "" clientCertKey: ""
使用Helm安裝
[root@node1 minio] [root@node1 minio] NAME: minio LAST DEPLOYED: Fri Sep 22 13:03:56 2023 NAMESPACE: minio STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Minio can be accessed via port 9000 on the following DNS name from within your cluster: minio.minio.svc.cluster.local To access Minio from localhost, run the below commands: 1. export POD_NAME=$(kubectl get pods --namespace minio -l "release=minio" -o jsonpath="{.items[0].metadata.name}") 2. kubectl port-forward $POD_NAME 9000 --namespace minio Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ You can now access Minio server on http://localhost:9000. Follow the below steps to connect to Minio server with mc client: 1. Download the Minio mc client - https://docs.minio.io/docs/minio-client-quickstart-guide 2. Get the ACCESS_KEY=$(kubectl get secret minio -o jsonpath="{.data.accesskey}" | base64 --decode) and the SECRET_KEY=$(kubectl get secret minio -o jsonpath="{.data.secretkey}" | base64 --decode) 3. mc alias set minio-local http://localhost:9000 "$ACCESS_KEY" "$SECRET_KEY" --api s3v4 4. mc ls minio-local Alternately, you can use your browser or the Minio SDK to access the server - https://docs.minio.io/categories/17
查看pod運行情況
[root@node1 ~] NAME READY STATUS RESTARTS AGE minio-0 1/1 Running 0 3m50s minio-1 1/1 Running 0 3m50s minio-2 1/1 Running 0 3m50s minio-3 1/1 Running 0 3m49s [root@node1 minio] NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE export-minio-0 Bound pvc-a70a5caa-2bad-40ab-bf19-dbbfccd3d151 10Gi RWO rook-ceph-block 28s export-minio-1 Bound pvc-c3c1a8c5-d429-47e4-acf6-a57da3bacd5a 10Gi RWO rook-ceph-block 28s export-minio-2 Bound pvc-15ed67b3-7ea0-4f06-ba46-93137480066c 10Gi RWO rook-ceph-block 28s export-minio-3 Bound pvc-a58ceb7f-dac0-4ee7-9a34-473c8f336d28 10Gi RWO rook-ceph-block 2
8s
查看Service地址
[root@node1 ~] NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE minio NodePort 10.98.63.29000:32100/TCP 8m25s minio-svc ClusterIP None 9000/TCP 8m25s
登陸網頁端上傳文件驗證
命令行方式訪問測試
curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o $HOME/minio-binaries/mc chmod +x $HOME/minio-binaries/mc export PATH=$PATH:$HOME/minio-binaries/ [root@node1 minio] NAME: mc - MinIO Client for object storage and filesystems. USAGE: mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: alias manage server credentials in configuration file ls list buckets and objects mb make a bucket rb remove a bucket cp copy objects mv move objects rm remove object(s) mirror synchronize object(s) to a remote site cat display object contents head display first 'n' lines of an object pipe stream STDIN to an object find search for objects sql run sql queries on objects stat show object metadata tree list buckets and objects in a tree format du summarize disk usage recursively retention set retention for object(s) legalhold manage legal hold for object(s) support support related commands license license related commands share generate URL for temporary access to an object version manage bucket versioning ilm manage bucket lifecycle quota manage bucket quota encrypt manage bucket encryption config event manage object notifications
訪問MinIO中存儲的文件
[root@node1 minio] [root@node1 minio] admin [root@node1 minio] [root@node1 minio] minio123456 [root@node1 minio] Added `my-minio` successfully. [root@node1 minio] [2023-09-22 1956 CST] 0B books/ [root@node1 minio] [2023-09-22 1919 CST] 5.7MiB STANDARD 植物 鮮花.jpg
遇到的問題
問題一
[root@node1 minio] Error: INSTALLATION FAILED: create: failed to create: Secret "sh.helm.release.v1.minio.v1" is invalid: data: Too long: must have at most 1048576 bytes
由于我在minio chart的解壓目錄新創建了一個cert文件夾,并生成了一些證書文件,導致了該錯誤的產生
解決辦法:刪除除了minio Chart 包中以外的文件包括文件夾,重新執行安裝。
審核編輯:湯梓紅
聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。
舉報投訴
-
存儲
+關注
關注
13文章
4314瀏覽量
85846 -
集群
+關注
關注
0文章
86瀏覽量
17177 -
文件
+關注
關注
1文章
566瀏覽量
24744
原文標題:Helm部署MinIO集群
文章出處:【微信號:magedu-Linux,微信公眾號:馬哥Linux運維】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
MinIO的基礎概念和環境部署
MinIO Client (mc) 為 UNIX 命令(如 ls、cat、cp、mirror、diff、find 等)提供了現代替代方案。它支持文件系統和兼容 Amazon S3 的云存儲服務(AWS Signature v2 和 v4)。
使用Helm 在容器服務k8s集群一鍵部署wordpress
摘要: Helm 是啥? 微服務和容器化給復雜應用部署與管理帶來了極大的挑戰。Helm是目前Kubernetes服務編排領域的唯一開源子項目,做為Kubernetes應用的一個包管理工具,可理解
發表于 03-29 13:38
Hadoop的集群環境部署說明
或者是相同,指令多、步驟繁瑣。有的時候覺得不免覺得很奇怪,這些發行商為什么不對hadoop的集群環境部署做一下優化呢?幸運的是總算是讓我找到了一個hadoop發行版集群環境搭建簡單易用。這里使用的是一款
發表于 10-12 15:51
如何部署基于Mesos的Kubernetes集群
的內核。把Kubernetes運行在Mesos集群之上,可以和其他的框架共享集群資源,提高集群資源的利用率。 本文是Kubernetes和Mesos集成指南系列文章第一篇:實戰部署。
發表于 10-09 18:04
?0次下載
高性能對象存儲MinIO的基本概念和環境部署
MinIO 是在 GNU Affero 通用公共許可證 v3.0 下發布的高性能對象存儲。它與 Amazon S3 云存儲服務 API 兼容。使用 MinIO 為機器學習、分析和應用程序數據工作負載構建高性能基礎架構。
發表于 08-29 10:54
?3213次閱讀
Kubernetes的集群部署
Kubeadm是一種Kubernetes集群部署工具,通過kubeadm init命令創建master節點,通過 kubeadm join命令把node節點加入到集群中
請問如何使用Helm在K8s上集成Prometheus呢?
ArtifactHub 為 Helm Chart 提供了公共和私有資源庫。我們將使用這些 Helm Chart 來設置 Kubernetes 集群中的 pod 和服務。
評論