The Docker Image contains the aws-cli and kubectl.
It is used to update the AWS ECR credentials periodically in a kubernetes cluster.
You need to add your credentials inside the file aws-ecr-secrets.yml.
Secrets need to be converted to base64. Eg:
echo -n 'AMJZ7XOS5QSYJKIAJ5Q4' | base64
You need to change the values of the environment variables in ecr-cron.yml.
Set up:
./config-aws.sh
After you should be able to see the cron job with:
kubectl get cronjobs -n infrastructure
AWS IAM Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:GetRepositoryPolicy",
"ecr:DescribeRepositories",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:BatchGetImage"
],
"Resource": [
"*"
]
}
]
}
Built-based on the blog post:
Content type
Image
Digest
Size
61.3 MB
Last updated
over 7 years ago
docker pull frekele/aws-ecr-kubectl