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:
- Package the Helm chart
- Create an ECR private repository
- Authenticate Helm to your ECR private registry
- 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β
- Login to AWS console.
- Go to ECR console.
- Switch to the preferred AWS region where you want to create the ECR private repository.
- Create a private repository,
- In the left navigation pane, click on Private registry -> Repositories.
- Click on the Create repository button.
- 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. - Click on Create repository button.
3. Authenticate Helm to your ECR private registryβ
note
- 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.
- 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,
Above command should output,
aws ecr get-login-password \
--region <aws_region> | helm registry login \
--username AWS \
--password-stdin <aws_account_no>.dkr.ecr.<aws_region>.amazonaws.comLogin 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.