Sub topic 7
Deploying a runner scale set
This chapter covers installing a runner scale set with Helm. It assumes you can use kubectl and Helm, understand namespaces and secrets, and have already installed the ARC controller in arc-systems. It also assumes you have chosen an authentication method. The examples use a personal access token (PAT), which suits a trial. A GitHub App is the better long-term choice, and the authentication chapter covers it.
What a scale set installation creates
The controller you installed earlier is cluster-wide infrastructure. It does not run jobs. A runner scale set is the unit that does. Each Helm release of the gha-runner-scale-set chart creates one logical pool of runners, registered with GitHub at one scope: a repository, an organization, or an enterprise.
Installing the chart creates these objects in the namespace you choose:
- An
AutoscalingRunnerSetresource, which holds the desired configuration. - A listener, started by the controller. It opens a long-poll connection to GitHub and reports how many jobs are waiting.
EphemeralRunnerSetandEphemeralRunnerresources, which the controller creates as demand changes. EachEphemeralRunnerbecomes one runner pod.- Supporting objects such as a service account, roles, and a role binding for the runner pods.
The release name matters. GitHub uses the installation name as the scale set name, and workflows target that name in runs-on. Pick a short name you are willing to type in every workflow, and do not rename it later. Renaming means a new release.
Step 1: create the runner namespace and secret
Keep runner pods out of arc-systems. A separate namespace lets you apply different quotas, network policies, and access rules to the pods that run untrusted workflow code.
kubectl create namespace arc-runners
kubectl create secret generic pre-defined-secret \
--namespace arc-runners \
--from-literal=github_token='<YOUR_PAT>'The secret must live in the same namespace as the release, and the key must be named github_token. Referencing an existing secret means the token never appears in a Helm command line or in your shell history as a --set argument. It also keeps the token out of the release values that Helm stores in the cluster.
A classic PAT for a repository-level scale set needs the repo scope. For an organization-level scale set it also needs admin:org. Some other fields in the chart apply to GitHub Apps only, so check which authentication keys your chosen method requires.
Step 2: write the values file
The chart's configuration is a values file. A minimal one for a repository looks like this:
githubConfigUrl: "https://github.com/<your-org>/<your-repo>"
githubConfigSecret: pre-defined-secret
minRunners: 0
maxRunners: 10
containerMode:
type: "dind"Each field does one job:
| Field | Meaning |
|---|---|
| `githubConfigUrl` | The scope the scale set registers with. A repository URL, an organization URL, or an enterprise URL. |
| `githubConfigSecret` | The name of an existing secret in the release namespace, or an inline map of credentials. |
| `minRunners` | Runners kept ready when the queue is empty. `0` means none. |
| `maxRunners` | The ceiling on concurrent runner pods. |
| `containerMode.type` | `dind` runs a Docker daemon beside the runner. `kubernetes` runs container steps as separate pods. |
The scope in githubConfigUrl decides which workflows can reach the scale set. A repository-scoped set serves only that repository. An organization-scoped set serves repositories the runner group allows. Choose the narrowest scope that fits.
Setting githubConfigSecret to a string uses a secret you created. If you give it a map instead, the chart creates a secret from the values. That puts the token in your values file, so avoid it for real credentials.
Step 3: install the chart
helm install arc-runner-set \
--namespace arc-runners \
-f values.yaml \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-setThe release name arc-runner-set becomes the label for runs-on. The chart is an OCI artifact, so there is no helm repo add step. Pin a version with --version in anything you keep in version control. Use the same version as your controller chart. The two charts are released together, and mismatched versions are a common source of listener errors.
Step 4: verify the installation
Check Helm first, then the pods.
helm list --namespace arc-runners
kubectl get pods -n arc-systems
kubectl get autoscalingrunnersets -n arc-runnersIn arc-systems you should see the controller pod and, after a short delay, a listener pod whose name starts with the release name and ends in -listener. The listener runs in the controller's namespace, not in arc-runners. This surprises many people who look for it next to the runners.
With minRunners: 0 there are no runner pods at idle, so an empty arc-runners namespace is the correct healthy state. The scale set should also appear in GitHub under the repository or organization settings, in the Actions runners page, with the name of your release.
To see scaling live, watch the runner namespace while a job runs:
kubectl get pods -n arc-runners --watchStep 5: run a smoke test
A small workflow proves the whole path works end to end.
name: ARC smoke test
on: workflow_dispatch
jobs:
hello:
runs-on: arc-runner-set
steps:
- run: echo "Running on $(hostname)"Trigger it from the Actions tab. The sequence is:
- GitHub queues the job and reports it to the listener.
- The listener raises the desired count and the controller creates an
EphemeralRunner. - A runner pod starts, registers with a one-time token, and takes the job.
- The job finishes and the pod is deleted.
The hostname printed in the log is the runner pod's name. If you run the workflow twice, you get two different names. That confirms each job had its own clean environment.
Organization-level installs and pod templates
To serve many repositories, point githubConfigUrl at the organization and override the pod template. The template.spec block lets you set the runner image, command, and resources.
githubConfigUrl: "https://github.com/<your-org>"
githubConfigSecret: pre-defined-secret
minRunners: 1
maxRunners: 20
template:
spec:
containers:
- name: runner
image: ghcr.io/actions/actions-runner:latest
command: ["/home/runner/run.sh"]
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
memory: 4GiThree details are easy to miss:
- The container must be named
runner. The chart merges your block with its own definition by name. A different name adds a second container instead of changing the runner. - Once you override
containers, you also take responsibility forcommand. The runner image does not start the agent without it. - Setting
minRunners: 1keeps one pod running at all times. That removes the startup delay for the first job and costs the resources of one idle pod.
An organization-level scale set also depends on runner groups. By default it joins the default group. If your organization restricts that group to selected repositories, jobs from other repositories stay queued and no error appears in Kubernetes.
Common errors
| Symptom | Likely cause | What to check |
|---|---|---|
| No listener pod appears | Controller is not running, or chart versions differ | `kubectl get pods -n arc-systems`, then the controller logs |
| Listener crashes at start | Bad token, missing scope, or wrong secret key | Secret has key `github_token`; PAT scopes match the URL |
| Job stays queued, no pods | `runs-on` does not match the release name, or runner group blocks the repository | Exact spelling; runner group settings |
| Pods start but stay pending | Not enough cluster capacity, or requests too large | `kubectl describe pod` events |
| Pod exits at once | Overridden container is missing `command` or is not named `runner` | Template block and pod logs |
Check the runs-on spelling first. A mismatch produces no error anywhere. The job simply waits.
Exercise
You installed the scale set with helm install build-pool ... in the arc-runners namespace, and minRunners is 0. A workflow uses runs-on: arc-runner-set and stays queued forever, while kubectl get pods -n arc-runners shows nothing. Name the problem, the fix, and say whether the empty namespace is a symptom.
Show answer
The workflow label does not match the installation name. The scale set is named build-pool, so the workflow must use runs-on: build-pool. The empty namespace is not a symptom, because with minRunners: 0 no runner pods exist while the queue is empty. GitHub never routed the job to this scale set, so no pod was requested.
Exercise
Why does the chapter recommend referencing an existing secret through githubConfigSecret rather than putting the token in the values file, and which key name must the secret contain?
Show answer
An existing secret keeps the token out of the values file, Helm command line, and stored release values. The secret must be in the release's namespace and contain the key github_token when you use a PAT.