Is there a way to deploy a image from bitbucket pipeline into EKS cluster with private endpoint?

kudupudi.kumar October 9, 2023

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?

2 answers

1 accepted

2 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2023

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

kudupudi.kumar October 10, 2023

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

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 12, 2023

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

kudupudi.kumar October 12, 2023

Thank you @Patrik S

I will follow the steps in the document to create a self hosted runner in the same VPC .

 

Thank you

Like Patrik S likes this
0 votes
kudupudi.kumar October 10, 2023

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events