I have run the latest version of minio with Docker and can access it normally by browser. Then I installed the MC client and tested Minio with MC, and everything worked fine. but when I use helm add the minio repo. I get a 403 error.
[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]#
my minio version is latest(RELEASE.2020-06-14T18-32-17Z) my mc version is RELEASE.2020-05-28T23-43-36Z my helm version is version.BuildInfoVersion:"v3.2.3"
how can i add the repo to helm successfully?
You wrote:
As far as I know helm can't use s3 natively, so in our scenario we used the helm s3 plugin wich provides s3 protocol support.
GitHub Repo: https://github.com/hypnoglow/helm-s3
Depending on your scenario, you might have to set some environment variables too, see https://github.com/hypnoglow/helm-s3/blob/master/hack/integration-tests-local.sh#L9 for more details (Hint: S3-Endpoint URL is set via AWS_ENDPOINT ENV-variable, so be sure this is set)
After installing and configuring the plugin I was able to init and add the repo.
Be sure to init you repo (Note that the enpoint URL is not part of the s3-url. The s3 plugin uses the AWS_ENDPOINT ENV-variable to set the endpoint URL. "test-bucket/charts" is the location of the bucket on the defined repo):
This is setting up the repo and adds the index.yaml
You can then add the repo
After adding the repo you can push charts
Also take at look at the following script, wich helped me to understand the needed steps to add, init and use the repo correctly: https://github.com/hypnoglow/helm-s3/blob/master/hack/integration-tests.sh
Also, indexing is done automatically by the plugin when pushing (See https://github.com/hypnoglow/helm-s3#push)