GitLab Runner is a lightweight, scalable application that works together with GitLab CI/CD to run automated jobs and then send the results back to GitLab.
When you commit code to your GitLab repository, GitLab looks at the .gitlab-ci.yml file to see what jobs need to be run. It then assigns those jobs to an available runner, in our case this will be the private runner we are about to setup. The runner executes the scripts defined in the job such as running tests or building a docker image. Runner then collects the logs and artifacts and will report back a success or failure on the GitLab Server. [1]
GitLab Runner workflow. [1]
Ensure the microk8s helm addon is enabled.
microk8s enable helm3
2. Add the Gitlab helm Repository
microk8s helm3 repo add gitlab https://charts.gitlab.io
microk8s helm3 repo update
3. Get a Runner registration token form GitLab by doing the following:
Go to https://www.gitlab.com
Create a project by pressing the + sign in the top right corner and creating a new project.
Inside that project go to Settings -> CI/CD -> Runners -> Create Project Runner
4. Copy the token that was created and keep it available temporarily.
5. Create the .gitlab-runner-values.yaml file in your home directory.
6. Install Gitlab Runner via Helm
microk8s kubectl create namespace gitlab-runner
microk8s helm3 install gitlab-runner gitlab/gitlab-runner -n gitlab-runner -f ~/.gitlab-runner-values.yaml
7. Verify the runner is running
microk8s kubectl get pods -n gitlab-runner
8. Verify runner is contacting Gitlab.com by going to the runner section of your project.
9. Convert your microk8s configuration to a BASE64 encoded string so we can save it as an variable on GitLab
microk8s config | base64 -w 0
*Copy this entire string, generally they will end with an =
10. Add to your KUBECONFIG_CONTENT variable on GitLab found in Project -> Settings -> CI/CD -> Variables
References
[1] GitLab, "GitLab Runner," GitLab Docs. [Online]. Available: https://docs.gitlab.com/runner/. [Accessed: Mar. 25, 2026].