GitLab with AKS Runner
Published in
2 min readJul 28, 2024
This story shares my experience on setting up GitLab runners on AKS Cluster.
Prepare the AKS Cluster
(planned to hack my cluster? trust me, this cluster has been deleted :) )
Create namespace
kubectl create namespace runner1
Prepare the values.yaml
# The GitLab Server URL (with protocol) that you want to register the runner against
# ref: https://docs.gitlab.com/runner/commands/index.html#gitlab-runner-register
#
gitlabUrl: https://gitlab.com/
# The registration token for adding new runners to the GitLab server
# Retrieve this value from your GitLab instance
# For more info: https://docs.gitlab.com/ee/ci/runners/index.html
#
runnerRegistrationToken: "1234567"
# For RBAC support:
rbac:
create: true
# Run all containers with the privileged flag enabled
# This flag allows the docker:dind image to run if you need to run Docker commands
# Read the docs before turning this on:
# https://docs.gitlab.com/runner/executors/kubernetes/index.html#using-dockerdind
runners:
privileged: true
Install the chart
helm repo add gitlab https://charts.gitlab.io
helm repo update
Release the helm
helm install --namespace runner1 --create-namespace -f values.yaml gitlab-runner gitlab/gitlab-runner
Check the helm
helm --namespace runner1 get all gitlab-runner
Check Pods
kubectl -n runner1 get all
Runner is up now