AWS ECS Fargate | Images from Private Gitlab Registry

0

Hello

We have a private Gitlab deployment running on EC2 instances which hosts our container registry in a private subnet. We want to setup ECS Fargate and the tasks execution is returning unable to resolve gitlab.company.com. Is it possible for Fargate to pull images from private registries that are running in local/private networks?

Thanks

질문됨 일 년 전933회 조회
2개 답변
0

Fargate is also recognized for use in private registries.
https://aws.amazon.com/jp/blogs/compute/introducing-private-registry-authentication-support-for-aws-fargate/

I thought "extra_hosts" in the following document might be relevant, since it seems that name resolution is not working.
https://github.com/ayufan/gitlab-ci-multi-runner/blob/master/docs/configuration/advanced-configuration.md

profile picture
전문가
답변함 일 년 전
  • Thanks for the response. The article explains how we can setup private registries but does not provide any details if the registry can be in private network. extra_hosts variable seems to be container variable. My understanding is that the fargate host first pulls the image from the registry and then spins up the container, this variable comes into effect when the container is started. (I could be wrong). There might be a way to have the manipulate fargate hosts so it can talk to private registry on a private network. Maybe using private link but I am not sure if thats the right path. Thoughts?

0

Hello Abdul,

Thank you for using AWS services.

Have you tried using VPC Endpoint ? I've recently experimented similar use-case to pull an image from Private ECR to my ECS Cluster, i was able to do so using the VPC Endpoint (My ECS Cluster was provisioned with Fargate as capacity Provider). While creating the VPCEndpoint, please make sure to enable Private DNS Name.

Reference: https://docs.aws.amazon.com/AmazonECR/latest/userguide/vpc-endpoints.html

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인