Gitlab runner installed on Kubernetes is not showing up in Gitlab UI when trying to set up runner

Hi,

I have followed the instructions on this page about setting up a Gitlab runner on a Kubernetes cluster.
Run GitLab Runner on a Kubernetes cluster

I have already registered a cluster to the group by going to Operation -> Kubernetes and also created the gitlab namespace on the Kubernetes cluster. I have followed steps 1 to 4 and still cannot see the runner in the group settings by going [Settings -> CI/CD -> Runners -> Group Runners]

Here is what I have in the runner_config.yml file, for the token field, I used the registration token provided by the Gitlab UI. it is provided at Settings -> CI/CD -> Runners -> Group Runners:
apiVersion: v1
kind: ConfigMap
metadata:
name: gitlab-runner
namespace: gitlab
data:
config.toml: |
concurrent = 10

    [[runners]]
      name = "Kubernetes Runner"
      url = "https://gitlab.com"
      token = "***"
      executor = "kubernetes"
      [runners.kubernetes]
        namespace = "gitlab"
        image = "ubuntu:18.04"

I kept the runner_deployment.yml file the same as is.

I have checked the status of the of the pod in kubernetes and it is running as expected. But when I try to go and set up the group runner in Gitlab, I cannot see it. I’m expecting to see it because the instructions state that I should be able to.

"The new runner will now show up in the GitLab web UI at the appropriate level (instance, group or project)."

Hey @cod3min3, the issue here is that you used the registration token in your ConfigMap rather than the runner token that is provided once you register a runner with your group.

You’ll need to first register a runner via the API with your group. The curl command to do so looks something like this (for GitLab.com):

curl --request POST 'https://gitlab.com/api/v4/runners' --form 'token=xxxxxxxxxxxxxxx' --form 'description=my-first-runner'

You should then get output similar to the following and a runner should show up in Settings -> CI / CD -> Runners in your group:

{"id":123456,"token":"xxxxxxxxxx"}

The value of "token":"xxxxxx" is what you’ll provide in the ConfigMap.