Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save suhas316380/a582577b39762bd00de28ba1af6605e1 to your computer and use it in GitHub Desktop.
Save suhas316380/a582577b39762bd00de28ba1af6605e1 to your computer and use it in GitHub Desktop.
Create a Helm chart repository using Amazon S3

This outlines how to use S3 bucket as a repository for your helm charts

Sources:

  1. How to create a helm-chart repository using S3
  2. Hackernoon

Steps:

  1. Create a S3 Bucket named "helm-charts-s3-bucket" with the following bucket polcy
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowListObjects",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::12345:role/your_role"
            },
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::helm-charts-s3-bucket"
        },
        {
            "Sid": "AllowObjectsFetchAndCreate",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::12345:role/your_role"
            },
            "Action": [
                "s3:DeleteObject",
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::helm-charts-s3-bucket/*"
        }
    ]
}
  1. Install the S3 Plugin for Helm: helm plugin install https://github.com/hypnoglow/helm-s3.git
  2. Initilize S3: touch index.html && aws s3 cp index.html s3://helm-charts-s3-bucket && rm -f index.html
  3. Initilize our S3 Bucket as the repo: helm s3 init s3://helm-charts-s3-bucket
  4. Add a repo in S3: helm repo add rabbitmq https://helm-charts-s3-bucket.s3.amazonaws.com
  5. Fetch a Helm chart and save it locally: helm fetch stable/rabbitmq
  6. Push it to S3: helm s3 push rabbitmq-6.12.1.tgz rabbitmq
  7. Test: helm repo list

Create a Helm chart repository using Amazon S3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment