Sub topic 14
Observing and troubleshooting ARC
This chapter assumes you have installed the controller and a runner scale set as in the earlier chapters. You should be comfortable with kubectl get, describe and logs, and you should know the four ARC parts: controller, scale set, listener, and runner pods.
ARC failures are usually easy to locate if you know which component owns which step. A job that never starts is a different problem from a runner pod that starts and crashes. This chapter gives you a fixed inspection order and a map from symptoms to causes.
Where each component lives
The two Helm installs put ARC's pieces in different namespaces. That determines where you look first.
| Component | Namespace in this tutorial | How to find it |
|---|---|---|
| Controller pod | `arc-systems` | `kubectl get pods -n arc-systems` |
| Listener pod | `arc-systems` | Name ends in `-listener` |
| Scale set resources | `arc-runners` | `kubectl get autoscalingrunnersets -n arc-runners` |
| Runner pods | `arc-runners` | Appear and disappear with jobs |
The controller creates the listener pod in the controller's namespace, not in the runner namespace. People often look for it in arc-runners and conclude it is missing.
ARC also installs custom resources. Each one records the state of one layer, so you can inspect state without reading logs.
AutoscalingRunnerSetis created by the scale set chart. It holds your configuration.AutoscalingListenerdescribes the listener the controller should run.EphemeralRunnerSetholds the current desired number of runners.EphemeralRunnerrepresents one runner, and each has a pod behind it.
Inspect in order, from top to bottom
Work through the layers in the order a job travels. Stop at the first layer that looks wrong.
Step 1: the controller
kubectl get pods -n arc-systems
kubectl logs -n arc-systems deployment/arc-gha-rs-controller
helm list -n arc-systemsThe deployment name comes from the Helm release name plus a chart suffix. With the release called arc, it is arc-gha-rs-controller. If your name differs, take it from kubectl get deployments -n arc-systems.
A controller that is not Running usually has an image pull problem, a missing CRD, or a failed Helm install. helm list and helm status show whether the release is deployed or failed.
Step 2: the listener
The listener is the component that talks to GitHub and reports how many jobs are waiting. If it is missing or crash-looping, nothing scales. Most authentication problems appear here.
kubectl get pods -n arc-systems
kubectl logs -n arc-systems <listener-pod-name>
kubectl get autoscalinglisteners -n arc-systemsIf no listener pod exists at all, the controller could not create one. Read the controller log. It normally states why, such as a rejected credential or an unreachable GitHub URL.
Step 3: the runner resources
kubectl get autoscalingrunnersets -n arc-runners
kubectl get ephemeralrunnersets -n arc-runners
kubectl get ephemeralrunners -n arc-runners
kubectl describe ephemeralrunner <name> -n arc-runnersCompare the counts to what you expect. If the listener reports pending jobs but no EphemeralRunner appears, the controller is not reacting. If runners exist but are stuck in a failed state, the describe output carries the reason. It usually points to the pod.
Step 4: the runner pod
kubectl get pods -n arc-runners --watch
kubectl describe pod <runner-pod> -n arc-runners
kubectl logs <runner-pod> -n arc-runners -c runnerPods are short-lived. A runner pod may be gone by the time you look. Run --watch in one terminal, trigger a job in another, and use describe on the pod while it exists. Events at the bottom of describe show scheduling failures, image pulls, and eviction.
For dind mode, the Docker daemon runs in a sidecar container. If builds fail with Docker connection errors, read that container's log too. List the container names with kubectl get pod <pod> -n arc-runners -o jsonpath='{.spec.containers[*].name}'.
Symptoms and likely causes
| Symptom | Likely cause | What to check |
|---|---|---|
| Job waits as "Queued", no runner pods appear | `runs-on` does not match the installation name | The `helm install` release name versus the workflow label |
| Listener pod missing | Controller cannot authenticate or reach GitHub | Controller logs, `githubConfigUrl`, secret contents |
| Authentication or 401/403 errors | Token expired, wrong scope, or wrong secret key | Secret key is `github_token`; the PAT has the required permissions for repo or organization level |
| Runner pod `Pending` | No node has enough CPU or memory, or taints block it | `describe pod` events, requests, tolerations, node selectors |
| Runner pod `ImagePullBackOff` | Wrong image name, or registry needs credentials | Image reference in the template, image pull secrets |
| Runner container `OOMKilled` | Memory limit too low for the job | `describe pod`, last state of the container |
| dind container will not start | Cluster policy forbids privileged containers | Pod security settings in the runner namespace |
| Jobs wait even though `maxRunners` is high | Cluster is full, or runner pods stuck `Pending` | Node capacity and pod events |
The first row is the most common mistake. The label in runs-on must equal the Helm release name of the scale set, character for character. A scale set installed as arc-runner-set is not matched by runs-on: arc-runners. GitHub accepts the workflow and holds the job in the queue, because it has no error to report. Nothing fails, so no log shows a problem.
Checking authentication quickly
A secret with the wrong key name is easy to miss. Confirm the key exists without printing the token:
kubectl get secret pre-defined-secret -n arc-runners \
-o jsonpath='{.data}' | grep -o 'github_token'If the output is empty, recreate the secret with the key github_token. Then check that the githubConfigUrl in your values file points to the repository or organization your token can access. A PAT that works for one repository does not help if the URL names an organization where the token has no admin rights.
After you fix a secret or values file, apply the change with helm upgrade on the scale set release. Then watch the listener pod come back:
helm upgrade arc-runner-set \
--namespace arc-runners \
-f values.yaml \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set
kubectl get pods -n arc-systems --watchMetrics for ongoing observation
Logs help you debug a single failure. To see trends such as queue depth and job startup time, enable metrics. Recent versions of the controller chart can expose Prometheus metrics from the controller and from each listener. You turn them on in the controller chart values:
metrics:
controllerManagerAddr: ":8080"
listenerAddr: ":8080"
listenerEndpoint: "/metrics"Apply this with helm upgrade on the controller release. Metric support depends on the chart version, so check the values reference for the version you run. The metrics fall into groups:
- Runner counts: registered, busy, idle, and desired runners per scale set.
- Job counts: assigned, running, started, and completed jobs.
- Durations: how long jobs take to start and to execute.
Two comparisons are useful. If desired runners rise but busy runners do not, pods are failing to start, which points back to scheduling or image problems. If assigned jobs stay high while desired runners sit at maxRunners, you have hit your ceiling and should raise it or add cluster capacity.
Cleaning up stuck resources
Runner pods that fail repeatedly may leave EphemeralRunner objects in a failed state. The controller normally replaces them. If a resource lingers, read its events first with kubectl describe. Delete it only after you know the cause, because a new runner will hit the same failure. Never remove the namespace to "reset" a scale set. Uninstall and reinstall the Helm release instead, so the controller can clean up the GitHub-side registration.
A short diagnosis example
A team reports that jobs sit in "Queued". You run the steps in order:
kubectl get pods -n arc-systems
kubectl get ephemeralrunners -n arc-runners
helm list -n arc-runnersThe controller and listener are Running, and no EphemeralRunner exists. helm list shows the release is named arc-runner-set, but the workflow says runs-on: arc-runners. The fix is to change the workflow label, not the cluster.
Exercise
A runner pod stays in Pending and the job never starts. The controller and listener are healthy. Name the command you run next and two causes it can reveal.
Show answer
Run kubectl describe pod <runner-pod> -n arc-runners and read the Events section. It can reveal that no node has enough CPU or memory for the pod's requests, or that node taints or a node selector prevent scheduling. It can also show a failed image pull or a cluster policy rejecting the pod.
Exercise
The listener pod does not exist after you install a scale set. In which namespace do you look for it, and where do you look for the reason it is missing?
Show answer
Look in the controller's namespace (arc-systems in this tutorial), because the controller creates the listener there, not in the runner namespace. Read the controller's logs with kubectl logs -n arc-systems deployment/arc-gha-rs-controller. They normally name the cause, such as a bad credential or an unreachable GitHub URL.