Gitlab Runner on K8S - CE

I try to install a GitlabRunner with helm. So far so good. The Pod raises but can’t register to my gitlab instance.

The Problem is that the domain is only available for a certain part of ipadresses. So when the runner tries to register with its domainname, it failes since the underlying node-ip addresses are not static and not allowed to access externally.

I’ve tried to rewrite it with hostAliases to its internal IP, which would work, but the registration always tries to go over the external IP.

This is my values.yaml

runnerRegistrationToken: "xxxyyyxxxyyyzzz"
concurrent: 10
checkInterval: 30
clusterWideAccess: false
  enabled: true

executor: kubernetes 
name: gitlabrunner-001
## privileged ist deprecated. Bei Zeiten mal Google Kaniko testen
privileged: true
  - ip: ""
    - ""

## Configuration for the Pods that the runner launches for each new job
  # runner configuration, where the multi line strings is evaluated as
  # template so you can specify helm values inside of it.
  # tpl:
  # runner configuration:
  config: |
        image = "ubuntu:16.04"

This is what the logs says:

2021-04-29 17:02:12.008 CEST e[0;m
2021-04-29 17:02:42.010 CESTe[31;1mERROR: Registering runner... failed e[0;m e[31;1mrunnere[0;m=nkTBPD3Y e[31;1mstatuse[0;m=couldn't execute POST against Post dial tcp i/o timeout
2021-04-29 17:02:42.010 CESTe[31;1mPANIC: Failed to register the runner. You may be having network problems.e[0;m
2021-04-29 17:02:47.015 CESTRegistration attempt 2 of 30
2021-04-29 17:02:47.062 CESTRuntime platform e[0;m arche[0;m=amd64 ose[0;m=linux pide[0;m=41 revisione[0;m=7f7a4bb0 versione[0;m=13.11.0
2021-04-29 17:02:47.064 CESTe[0;33mWARNING: Running in user-mode. e[0;m
2021-04-29 17:02:47.064 CESTe[0;33mWARNING: The user-mode requires you to manually start builds processing:e[0;m
2021-04-29 17:02:47.064 CESTe[0;33mWARNING: $ gitlab-runner run e[0;m
2021-04-29 17:02:47.064 CESTe[0;33mWARNING: Use sudo for system-mode: e[0;m
2021-04-29 17:02:47.064 CESTe[0;33mWARNING: $ sudo gitlab-runner... e[0;m

I’m running the latest version of gitlab-ce and the runner.

I must confess, I am still quite new to Kubernetes. Likewise in Helm. My previous runners that simply ran as Docker containers never had any problems! :slight_smile:

Thanks for advice and some hints.

– Tom