Kubernetes GitLab Runner via Helm fails to register

Viewed 1096

I am having a problem with a helm deployment of GitLab onto my kubernetes cluster. Everything was working except for the GitLab Runner that was throwing the error:

ERROR: Registering runner... forbidden (check registration token)
PANIC: Failed to register this runner. Perhaps you are having network problems 
1 Answers

The solution to this was the gitlab-gitlab-runner-secret.

Data element: runner-registration-token

value: FGvuUvo0aAce2xkLjvWxj1ktGHD8NAzWY4sLYDVvD3Z56JXh2E7rwfaTvKGkRlUJ

It was pre-populated with an invalid runner-registration-token. I solved this by:

  1. Going to GitLab Admin Area --> Runners
  2. In the section "Set up a shared Runner manually", copy the registration token.
  3. On a bash command line encode the string to base64 with the command:
echo <my_registration_token> | base 64
  1. Copy the output value and go Edit the kubernetes secret for gitlab-runner-secret.
  2. Paste the encrypted value OVER the existing value, then click the Update button to save changes.
  3. Now stop/destory the runner pod OR scale the deployment to zero destroy it and scale the deployment back up to 1.
  4. Now you will see the GitLab Runner pod finally running properly with the log showing:
Registering runner... succeeded
Runner registered successfully.
Related