Making http request from aws codebuild buildspec file to an EC2 instance which is in EKS cluster

81 views Asked by At

I have AWS codebuild buildspec ym file and a pod in EKS cluster, I need to run some logic in the pod triggered from buildspec file through http request.

I have buildspec as the follwoing: post_build: commands: - curl http://service-name.eks_cluster_name:8000/blabla

but it exist with status code 6, meaning could not resolve service-name.eks_cluster_name domain name ?

Any help to make it works or a workaround, would appreciated ?

Thank you

tried - curl http://service-name.eks_cluster_name:8000/blabla but domain name could not be resolved. I'm expecting that the serive service-name.eks_cluster_name:8000 to be reachable from aws codebuild buildspec ?

0

There are 0 answers