我已经在Docker上运行了最新版本的minio,并且可以通过浏览器正常访问它。 然后,我安装了MC客户端并用MC测试了Minio,一切正常。 但是当我使用头盔时,请添加minio回购。我收到403错误。
[root@k8smaster01 helm-charts]# mc config host list
gcs
URL : https://storage.googleapis.com
AccessKey : YOUR-ACCESS-KEY-HERE
SecretKey : YOUR-SECRET-KEY-HERE
API : S3v2
Lookup : dns
local
URL : http://localhost:9000
AccessKey :
SecretKey :
API :
Lookup : auto
myminio
URL : http://172.16.5.182:9000
AccessKey : minioadmin
SecretKey : minioadmin
API : s3v4
Lookup : auto
play
URL : https://play.min.io
AccessKey : Q3AM3UQ867SPQQA43P2F
SecretKey : zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
API : S3v4
Lookup : auto
s3
URL : https://s3.amazonaws.com
AccessKey : YOUR-ACCESS-KEY-HERE
SecretKey : YOUR-SECRET-KEY-HERE
API : S3v4
Lookup : dns
[root@k8smaster01 helm-charts]# mc ls myminio
[2020-06-16 18:10:01 CST] 0B minio-helm-repo/
[root@k8smaster01 helm-charts]# mc ls myminio/minio-helm-repo/
\[2020-06-16 18:17:20 CST] 76B index.yaml
[root@k8smaster01 helm-charts]# helm repo add minio-test-repo http://172.16.5.182:9000/minio-helm-repo
Error: looks like "http://172.16.5.182:9000/minio-helm-repo" is not a valid chart repository or cannot be reached: failed to fetch http://172.16.5.182:9000/minio-helm-repo/index.yaml : 403 Forbidden
[root@k8smaster01 helm-charts]#
[root@k8smaster01 helm-charts]# helm repo add minio-test-repo http://172.16.5.182:9000/minio-helm-repo --username minioadmin --password minioadmin
Error: looks like "http://172.16.5.182:9000/minio-helm-repo" is not a valid chart repository or cannot be reached: failed to fetch http://172.16.5.182:9000/minio-helm-repo/index.yaml : 400 Bad Request
[root@k8smaster01 helm-charts]#
我的minio版本是最新版本(RELEASE.2020-06-14T18-32-17Z) 我的mc版本是RELEASE.2020-05-28T23-43-36Z 我的掌舵版本是version.BuildInfoVersion:“ v3.2.3”
我怎样才能成功地将仓库添加到掌舵?
答案 0 :(得分:0)
您写道:
API:s3v4
据我所知helm不能在本地使用s3,因此在我们的方案中,我们使用了 helm s3插件,它提供了s3协议支持。
GitHub存储库:https://github.com/hypnoglow/helm-s3
根据您的情况,您可能还必须设置一些环境变量,有关更多详细信息,请参见https://github.com/hypnoglow/helm-s3/blob/master/hack/integration-tests-local.sh#L9 (提示:S3-Endpoint URL是通过AWS_ENDPOINT ENV变量设置的,因此请确保已设置)
在安装和配置了插件之后,我能够初始化并添加存储库。
请务必初始化您的仓库 (请注意,enpoint URL并非s3-url的一部分。s3插件使用AWS_ENDPOINT ENV变量设置端点URL。“ test-bucket / charts”是存储桶在定义的存储库中的位置):< / p>
helm s3 init s3://test-bucket/charts
这正在设置存储库并添加index.yaml
然后您可以添加存储库
helm repo add repo-name s3://test-bucket/charts
添加回购后,您可以推送图表
helm s3 push chart.tgz repo-name
还请看以下脚本,它帮助我了解了正确添加,初始化和使用存储库的必要步骤: https://github.com/hypnoglow/helm-s3/blob/master/hack/integration-tests.sh
此外,在推送时插件会自动完成索引编制 (请参见https://github.com/hypnoglow/helm-s3#push)