Using Amazon S3 as a Helm Chart Repository with Argo CD

Myron Zaiets
GitOps and Argo CD
Published in
3 min readJun 1, 2023

Helm is a popular package manager for Kubernetes that simplifies the deployment and management of applications. By default, Helm uses the official Helm chart repository, but you can also set up your own private chart repository for internal use. In this article, we will explore how to use Amazon S3 as a Helm chart repository, leveraging the scalability and durability of Amazon S3 to store and distribute Helm charts.

In this article, I want to test the S3 functionality as a repo origin for Argo CD application.

Table of Contents:

  1. Prerequisites
  2. Setting Up an S3 Bucket
  3. Creating a Helm Chart Package
  4. Publishing Helm Charts to S3
  5. Using the S3 Helm Chart Repository

Let’s start then.

  1. Prerequisites

I have already installed Argo CD on minikube.

2. Setting Up an S3 Bucket

I created an S3 bucket with public access and enabled static website hosting (I am not sure if it’s needed, as I didn’t test without it).

3. Creating a Helm Chart Package

Once we run helm create mychart2023 I will delete all the templates and add just the Nginx deployment:

Then we need to package it by using the command helm package mychart2023, then you will have tgz file generated in the current directory.

To create index.yaml, you need to write helm repo index and it will generate this file:

index.yaml

4. Publishing Helm Charts to S3

Copy those 2 files to S3 and you will have:

It’s recommended to run helm repo index whenever you package a Helm chart using the helm package command.

The helm repo index command generates or updates the index.yaml file, which is used by Helm to locate and retrieve charts from a chart repository.

5. Using the S3 Helm Chart Repository

Let's create our Argo CD application and reference S3 bucket as our repo:

application.yaml

It’s time to deploy it and check Argo CD:

As you can see, the application is deployed, and it’s using S3 as a backend.

I didn’t test more, but it seems to be working without issues.

Thank you for your time.

--

--