I have configured a bitbucket.yaml pipeline where I have passed the kube_token to authenticate and deployed the build image into EKS cluster. This happens EKS cluster with public endpoint. Where as I want to secure my cluster by enabling the private endpoint. When I changed my endpoint from public to private endpoint, the existing pipeline was unable to authenticate with cluster to deploy the new image. Is there a way to deploy an image from bitbucket pipeline into private endpoint eks cluster?
Hello @kudupudi.kumar and welcome to the Community!
According to AWS EKS official documentation, when only a private endpoint is enabled in an EKS cluster, all traffic to your cluster API server must come from within your cluster's VPC or a connected network. Since the Bitbucket Cloud pipelines network will not be in the same VPC as your AWS EKS cluster, I'm afraid you will not be able to access the EKS resource from the pipeline.
You would still need to have a public endpoint enabled on your EKS cluster so pipelines can access it over the internet. In order to improve the security of your cluster, you can limit the CIDR IP blocks that can access the public endpoint allowing access only to the Valid IP addresses for Bitbucket Pipelines.
Thank you, @kudupudi.kumar !
Patrik S
Hi @Patrik S
Thanks for the quick reply.
I heard about BitBucket runners. Can I configure the runner in the VPC where my EKS cluster resides?
Thank you
KK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @kudupudi.kumar ,
You should be able to run a Self-hosted Linux Docker runner in an EC2 instance, for example, that is in the same VPC as your EKS cluster, which would in theory allow you to connect to your EKS cluster with only private endpoint enabled.
Thank you, @kudupudi.kumar .
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Patrik S
I will follow the steps in the document to create a self hosted runner in the same VPC .
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patrik S
Thanks for the quick reply.
I heard about BitBucket runners. Can I configure the runner in the VPC where my EKS cluster resides?
Thank you
KK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.