Sub topic 3
Choosing a Container Mode
Assume you understand Kubernetes pods, namespaces, secrets, Helm values, and GitHub Actions jobs. This chapter focuses on the operational choices after installing an ARC runner scale set.
Choosing a container mode
ARC supports different ways for a workflow to run container-based steps:
| Mode | How it works | Main trade-off |
|---|---|---|
| `dind` | A Docker daemon runs beside the runner | Broad compatibility, but usually requires privileged access |
| `kubernetes` | Jobs use Kubernetes pods and the cluster API | Better isolation, but requires Kubernetes-aware tooling and permissions |
Use dind when existing workflows expect Docker commands such as docker build. Use kubernetes when you want Kubernetes-native isolation and can adapt the workflow. Do not grant more cluster access than the workflow requires.
githubConfigUrl: "https://github.com/<your-org>/<your-repo>"
githubConfigSecret: pre-defined-secret
minRunners: 0
maxRunners: 10
containerMode:
type: "dind"Customizing the runner pod
The pod template controls the runner image, command, labels, and scheduling details. Keep the expected runner container name when overriding the template.
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: 4GiPin an image version rather than using latest for repeatable builds.
Resources and scheduling
Requests reserve capacity for scheduling. Limits cap consumption. Start with measured values, then adjust after observing real jobs. Use node selectors or tolerations when runners need dedicated nodes, but ensure those nodes have enough capacity for the configured maximum.
Securing runners
Store GitHub credentials in a Kubernetes Secret, not in a values file committed to source control. Prefer a GitHub App with narrowly scoped permissions when practical. Separate trusted and untrusted workloads into different scale sets and namespaces. Restrict service-account permissions and avoid mounting unnecessary host paths.
Observing and troubleshooting ARC
kubectl get pods -n arc-systems
kubectl get pods -n arc-runners --watch
kubectl describe pod <runner-pod> -n arc-runners
kubectl logs <listener-pod> -n arc-runnersA missing runner often indicates authentication, scale-set labels, scheduling, or resource problems. Check controller and listener logs before changing workflow files.
Upgrades and legacy ARC
Upgrade the official chart with helm upgrade and review its release notes before changing values. The current project uses the official gha-runner-scale-set charts. The older community project, commonly associated with summerwind/actions-runner-controller, has a different architecture and configuration. Do not mix its documentation or manifests with the scale-set charts.
Exercise
Which mode is the safer default for an untrusted workflow that does not need Docker commands?
Show answer
Kubernetes mode, with narrowly scoped permissions and a separate runner scale set.