This utility is heavy modified version of Amazon.com, Inc. ecr-cleanup-lambda to support multiple kubernetes clusters.
NOTE: Tested only with python 3.7.2.
Prerequisites:
Fist we need to generate list of used images in k8s cluster(s) and save it to S3 bucket. Run it on every cluster and save to same S3 bucket.
python ecr-cleanup.py genImagesList -h
Read all lists of used images from S3 bucket and clean ECR repository based given conditions.
python ecr-cleanup.py cleanImages -h
Content type
Image
Digest
Size
70.8 MB
Last updated
almost 7 years ago
docker pull pixelfederation/ecr-cleanup