Kubernetes pod cannot resolve host?

6/12/2019

I installed gitlab runner on kubernetes to use autoDevops. the runner and gitlab connected to each other but my problem is that whenever i want to run jobs on the runner, the runner says:

fatal: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.example.com/john-doe/akme-project.git/': Could not resolve host: gitlab.example.com

-- Ebrahim Ahmadi
devops
gitlab
kubernetes

1 Answer

6/12/2019

It looks like your installation is attempting to connect to a default location. Are you using helm to deploy this? If so, you may want to take a look at the following file:

https://gitlab.com/charts/gitlab-runner/blob/master/values.yaml

On line 19, you have the following:

# gitlabUrl: http://gitlab.your-domain.com/

You may want to try uncommenting this, and using the domain you use as a gitlab host.

-- Brett Ford
Source: StackOverflow