Bitbucket runner access REST API on host

Michael Mair July 27, 2022

We have a custom runner configured.

Now we want to access the Kubernetes service on the runner's host machine from within a build step.

Is there any way to achieve that?

2 answers

1 accepted

0 votes
Answer accepted
Michael Mair July 29, 2022

I solved it by using k0s and reset iptables, which was limiting the access from within the docker container.

My scenario: Test our software with a real running Kubernetes service on CI.

  1. Setup custom runner on one of our machines.
    I used Manjaro linux.
  2. Install Kubernetes on that machine (not in a docker container)
    I used k0s.
  3. Clear the iptables config as it restricts access to the host where the actual CI pipeline is executed.
  4. Configure the kubectl config to listen on the docker host (most likely something like 172.17.0.1)
0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2022

@Michael Mair  hi. Thanks for your question.

Please, check this guide.

Regards, Igor.

Michael Mair July 29, 2022

@Igor StoyanovThanks, but that is not what I was looking for. Please see my comment on what I meant and how I solved it.

Suggest an answer

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

Atlassian Community Events