I am trying to connect to a local kubernetes running on the same machine as the bitbucket pipeline self hosted runner. I am using the linux docker runner.On the same machine I have a minikube running.Added the kubeconfig to the repository variables encoded base64. In the kubeconfig file I edited the server url to point to http://host.docker.internal:9100 (port on which my kubernetes cluster works)Is it possible that the docker container running the pipe does not see the actual host.docker.internal?How could I connect it to a local kubernetes?
@Tibor Kadar have you tried kubernetes svc directly? https://kubernetes.svc.cluster.local? This will work though only if the runner is in the same cluster.
Thanks for pointing me in this direction!
This setup would require me to have the runner running in the kubernetes cluster as well. Which at the moment I would keep separate. A workaround that I used was to not use the pipe but actually download kubectl in the script section. Since the step runs in a docker container on the host machine it would see the host.docker.internal and I could connect.
It looks like you're new here. Sign in or register to get started.