Best way to deploy to EKS

0

is it best way to push image to ECR in build phase and runs kubectl command to deploy in test EKS cluster in test account, once testing completes and can we add another build phase that use the same image and run the kubectl command on the production cluster in production account.

asked a year ago204 views
2 Answers
2
Accepted Answer

Best approach is to implement Continuous Deployment on Amazon EKS using GitOps approach. Then CodeBuild would be restricted to the Continuous Integration phase (tests, scans, builds and pushes). There are many GitOps controllers out there, but Flux and ArgoCD are the most used.

https://aws.amazon.com/blogs/containers/automating-amazon-eks-with-gitops/

AWS
answered a year ago
0

Hi,

I see no issues with the approach you have mentioned. It's convenient to manage a single repository and allow cross account read access to it since you need to build and upload to ECR just once.

Another alternative is to setup cross account replication if you want maintain separation between test and production account. But in this case lifecycle rules and IAM policies are not replicated. You can also upload to each account separately. For me it just comes down to preference

--Syd

profile picture
Syd
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions