0

I have a CircleCI set-up to push docker images to ECR, similar to this question here: What is the idiomatic way to reload EKS/Kube configs when a new image is pushed to ECR

My question is two-fold:

  1. I've read that the latest tag is an anti-pattern and should be avoided and instead simply use the git commit id or something like that to tag the image. How does ECR identify which is the latest image if it is not explicitly tagged latest?

  2. How should I trigger EKS to pick the most recent image - have things changed since that last question was posted? Does it need the latest tag ?

1 Answer 1

1
  1. ECR is just a registry - so it only stores images - it does not identify latest images, nor provides any additional information beyond tags and sha256 image digests. So it is up to you to identify the sequence, common way is to use meaningful versioning system and tag with that. I.e., if you use SemVer, you can tag something like myimage:1.0.1, myimage:1.0.2 - which makes it pretty obvious what is newer.

  2. Things have not changed in principle since the last question. Generally speaking, promotion of a newer image to a Kubernetes cluster is a separate process (CD) from creating and storing such image (CI). So you need some other trigger to make the promotion happen - you can automate this as well, and add such trigger directly at the end of the CI step if that is what you want for now - though note that usually there is more complex approval logic here in production settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.