Skip to main content

Amazon ECR

note

This article assumes that you have helm chart for your application.

Publishing a Helm package to an AWS ECR (Elastic Container Registry) private repository involves several steps:

  1. Package the Helm chart
  2. Create an ECR private repository
  3. Authenticate Helm to your ECR private registry
  4. Push the Helm chart to ECR private registry

1. Package as Helm chart​

To package as helm chart please refer this article.

2. Create an ECR private repository​

  1. Login to AWS console.
  2. Go to ECR console.
  3. Switch to the preferred AWS region where you want to create the ECR private repository.
  4. Create a private repository,
    1. In the left navigation pane, click on Private registry -> Repositories.
    2. Click on the Create repository button.
    3. Fill in repository name field.
      Repository name must be same as Helm chart name. You can find your Helm chart name in Chart.yaml -> name.
    4. Click on Create repository button.

3. Authenticate Helm to your ECR private registry​

note
  1. Below steps require the AWS CLI to be installed and setup with required credentials. If it is not already installed, please refer to this article for installation instructions.
  2. Below steps require the Helm CLI to be installed. If it is not already installed, please refer to this article for installation instructions.
  • Login to ECR private helm registry,
    aws ecr get-login-password \
    --region <aws_region> | helm registry login \
    --username AWS \
    --password-stdin <aws_account_no>.dkr.ecr.<aws_region>.amazonaws.com
    Above command should output,
    Login Succeeded

4. Push the Helm chart to ECR private registry​

  • Below command will push the packaged helm chart to your ECR private registry,
    helm push <chart_name>-<chart_version>.tgz oci://<aws_acc_no>.dkr.ecr.<aws_region>.amazonaws.com/
  • You can optionally verify the Helm push by navigating to your ECR -> Private registry -> Repositories in your AWS console.