跳至内容

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.

已提问 3 年前357 查看次数
2 回答
2
已接受的回答

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
已回答 3 年前
AWS
专家
已审核 8 个月前
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

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。