Sub topic 2
Installing the Controller
Assume you have a Kubernetes cluster, kubectl, Helm, and permission to create namespaces and secrets. You also need a GitHub personal access token (PAT) or GitHub App with permission to manage runners.
Installing the controller
Actions Runner Controller (ARC) watches Kubernetes and GitHub. It creates runner pods when GitHub reports queued jobs. Install the controller in a dedicated namespace:
helm install arc \
--namespace arc-systems \
--create-namespace \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controllerThe controller does not run jobs itself. A runner scale set defines which GitHub repository or organization receives runners.
Deploying a runner scale set
Create a namespace and store the PAT in a Kubernetes Secret. Keeping the token in the Secret avoids placing it directly in the Helm command:
kubectl create namespace arc-runners
kubectl create secret generic pre-defined-secret \
--namespace arc-runners \
--from-literal=github_token='<YOUR_PAT>'Create values.yaml:
githubConfigUrl: "https://github.com/<your-org>/<your-repo>"
githubConfigSecret: pre-defined-secret
minRunners: 0
maxRunners: 10
containerMode:
type: "dind"Install the scale set. The installation name, arc-runner-set, becomes the workflow label:
helm install arc-runner-set \
--namespace arc-runners \
-f values.yaml \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-setRunning a workflow on your scale set
Set runs-on to the installation name:
name: ARC smoke test
on: workflow_dispatch
jobs:
hello:
runs-on: arc-runner-set
steps:
- run: echo "Running on $(hostname)"ARC starts an ephemeral runner pod for the job and removes it afterward. Each job therefore begins with a clean environment.
Scaling with `minRunners` and `maxRunners`
| Setting | Effect |
|---|---|
| `minRunners: 0` | Keeps no idle runners, reducing cost but adding startup latency. |
| `maxRunners: 10` | Prevents the scale set from creating more than ten runners. |
Set minRunners above zero when fast job startup matters. Set maxRunners according to cluster capacity, GitHub concurrency, and budget.
Exercise
Which value must a workflow use in runs-on?
Show answer
The Helm installation name of the runner scale set, such as arc-runner-set.