---
title: "Using GitHub ARC to run Self-Hosted Runners on Kubernetes"
description: "Maximize workflow efficiency with GitHub ARC: deploy, configure, and test self-hosted runners on Kubernetes seamlessly in this ATA tutorial!"
canonical: "https://adamtheautomator.com/github-arc/"
---

# Using GitHub ARC to run Self-Hosted Runners on Kubernetes

> Maximize workflow efficiency with GitHub ARC: deploy, configure, and test self-hosted runners on Kubernetes seamlessly in this ATA tutorial!

Source: https://adamtheautomator.com/github-arc/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Using GitHub ARC to run Self-Hosted Runners on Kubernetes](https://adamtheautomator.com/wp-content/uploads/2023/11/github-arc.jpg)

# Using GitHub ARC to run Self-Hosted Runners on Kubernetes

[![](https://secure.gravatar.com/avatar/ff757e22f03c8a84ce8a2b8f87c53481ba627afec8bd1c8fda5c576097ea027c?s=192&d=mm&r=g)Joseph Eshiett](https://adamtheautomator.com/author/joseph-eshiett/)27 November 20235 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[GitHub](/tag/github/)[Kubernetes](/tag/kubernetes/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Setting Up the GitHub ARC](#setting-up-the-github-arc)
*   [Deploying and Configuring the GitHub Self-hosted Runner](#deploying-and-configuring-the-github-self-hosted-runner)
*   [Testing the GitHub Self-hosted Runner](#testing-the-github-self-hosted-runner)
*   [Conclusion](#conclusion)

GitHub Actions provides a powerful way to automate workflows, allowing you to build, test, and deploy your code directly from your GitHub repository. But why not expand this capability with GitHub Action Runner Controllers (GitHub ARC)?

This tutorial is your ticket to getting more control over the environment where your workflows are executed. You’ll learn to leverage GitHub ARC to deploy and manage your self-hosted GitHub Runners on a Kubernetes cluster.

Stay tuned to scale and manage your runner instances dynamically with GitHub ARC!

## Prerequisites

Prepare for some hands-on learning! Ensure to have the following in place to follow along in this tutorial:

*   A Kubernetes cluster – This tutorial uses K3S running Kubernetes version 1.27.7

Related:[MicroK8s on Ubuntu: A Getting Started Guide](https://adamtheautomator.com/microk8s/)

*   [kubectl](https://kubernetes.io/docs/tasks/tools/) installed and configured to interact with your Kubernetes cluster.
*   A sample [GitHub repository](https://github.com/) (i.e., _eshiettjoseph/GitHub-arc-demo_) where you plan to use your self-hosted runners.
*   Helm package manager installed.

Related:[Kubernetes Helm : A Getting Started Guide](https://adamtheautomator.com/kubernetes-helm/)

*   A [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the ‘repo’ scope to authenticate the GitHub ARC.
*   [Cert-manager](https://cert-manager.io/docs/installation/).

## Setting Up the GitHub ARC

In your quest to optimize and streamline your workflow, the initial and crucial step involves setting up GitHub ARC on your Kubernetes cluster. This process, exemplified here through Helm, not only enhances the efficiency of your workflows but also empowers you to take full advantage of GitHub Actions in a Kubernetes environment.

To set up GitHub ARC on your Kubernetes Cluster with Helm, follow these steps:

1\. Open a terminal and execute the following command to add the [GitHub ARC Helm repository](https://actions-runner-controller.github.io/actions-runner-controller) to your local Helm configuration as `actions-runner-controller`. This way, the GitHub ARC will be installed via helm from the repository you added.

After running this command, Helm will have information about the specified repository, and you can then use Helm commands to interact with the charts available in that repository.

```bash
helm repo add actions-runner-controller https://actions-runner-controller.github.io/actions-runner-controller
```

If successful, you’ll see the following output.

![Adding the GitHub ARC Helm repository](https://adamtheautomator.com/wp-content/uploads/2023/11/image-183.png)

Adding the GitHub ARC Helm repository

2\. Next, run the below [`helm upgrade`](https://helm.sh/docs/helm/helm_upgrade/) command to perform the following to install the GitHub ARC Helm chart:

*   Upgrade or `--install` the requested helm chart and create a Kubernetes namespace called `actions-runner-system`.
*   Set a Helm value to true (`--set=authSecret.create=true`) to enable creating an authentication secret.

Related:[GitHub Actions Secrets : The Way to Secure Your Automation](https://adamtheautomator.com/github-actions-secrets/)

*   Set a Helm value for the authentication secret created (`--set=authSecret.github_token="YOUR_TOKEN"`). Ensure you replace `YOUR_TOKEN` with your personal access token.
*   Makes Helm `--wait` until all resources are ready before marking the installation as successful.
*   Sets the identifier (`actions-runner-controller`) for managing this release with Helm and references the Helm chart (`actions-runner-controller`). This identifier follows the format: helm repository/helm chart.

```bash
helm upgrade --install --namespace actions-runner-system --create-namespace \
  --set=authSecret.create=true \
  --set=authSecret.github_token="YOUR_TOKEN" \
  --wait actions-runner-controller actions-runner-controller/actions-runner-controller
```

The output below indicates the installation is complete.

![Verifying the GitHub ARC installation is complete](https://adamtheautomator.com/wp-content/uploads/2023/11/image-182.png)

Verifying the GitHub ARC installation is complete

3\. Now, run the below `kubectl` command to `get` `all` resources available in the `actions-runner-system` namespace.

```bash
kubectl get all -n actions-runner-system
```

This output confirms the GitHub ARC installation.

![Listing all resources available in the GitHub ARC deployment](https://adamtheautomator.com/wp-content/uploads/2023/11/image-181.png)

Listing all resources available in the GitHub ARC deployment

## Deploying and Configuring the GitHub Self-hosted Runner

With GitHub ARC set up, your focus now shifts to the vital component of powering your workflows within your Kubernetes cluster. You’ll deploy and configure a GitHub self-hosted runner to bring your automation to life.

To deploy and configure your GitHub self-hosted runner, carry out the following:

1\. Create a manifest file called `github-arc-demo.yaml` (arbitrary) with your preferred editor, add the following configurations, and save the file. Ensure you replace the repository `eshiettjoseph/GitHub-arc-demo` with yours.

This configuration creates your GitHub self-hosted runner (`demo-runner`) with the `kind` of `RunnerDeployment` and configures it to run against your repository with a single replica.

```yaml
# Define the Kubernetes API version and resource kind for the GitHub Actions Runner Deployment
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  # Specify a unique name for the GitHub Actions Runner Deployment
  name: github-arc-demo
spec:
  # Set the number of desired replicas for the GitHub Self-Hosted Runner
  replicas: 1
  template:
    spec:
      # Specify the GitHub repository to associate with the Runner
      repository: eshiettjoseph/GitHub-arc-demo
      labels:
        # Assign a custom label for identifying and categorizing the Runner
        - demo-runner
```

2\. Now, execute the following command to `apply` the manifest file (`github-arc-demo.yaml`) to your cluster.

```yaml
kubectl apply -f github-arc-demo.yaml
```

Once applied, you’ll see the following output as confirmation.

![Applying the GitHub Actions Runner deployment](https://adamtheautomator.com/wp-content/uploads/2023/11/image-186.png)

Applying the GitHub Actions Runner deployment

3\. Run the command below to confirm the deployment. This command fetches (`get`) all resources with the kind `RunnerDeployment` in the default namespace.

```bash
kubectl get runnerdeployment
```

As shown below, the `github-arc-demo` `RunnerDeployment` is found and confirmed.

![Confirming the GitHub Actions Runner deployment](https://adamtheautomator.com/wp-content/uploads/2023/11/image-185.png)

Confirming the GitHub Actions Runner deployment

4\. Lastly, navigate to your repository on GitHub (Settings → Actions → Runners), and you’ll see a single Runner available.

The following confirms that your GitHub self-hosted runner is running against your repositories properly. Note down the runner name, as you’ll need it later for confirmation.

![Confirming the GitHub self-hosted runner is actively running](https://adamtheautomator.com/wp-content/uploads/2023/11/image-184.png)

Confirming the GitHub self-hosted runner is actively running

## Testing the GitHub Self-hosted Runner

You’ve meticulously set up and configured the GitHub self-hosted runner, which is already a milestone. But, like a newly built bridge that undergoes rigorous testing to ensure its structural integrity, you must validate the reliability and effectiveness of your GitHub Self-hosted Runner.

To test your GitHub self-hosted runner, you’ll create a GitHub workflow to run in your GitHub repository, as follows:

1\. Create a folder called _.github/workflows_ in your GitHub repository, a standardized and recognized location for storing workflow configuration files.

This folder structure is crucial for GitHub Actions to detect and execute workflows associated with your repository automatically.

2\. Next, create a file named _test.yaml_ in the _.github/workflows_ folder, and add the following sample workflow to the file.

This workflow is designed to run manually through the Actions tab, providing flexibility for on-demand execution. The primary purpose is to validate that the self-hosted runner is operational and can execute workflows successfully.

```yaml
name: Test

on:
  # Allows running your workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  # Contains a single job called "test"
  test:
    runs-on: demo-runner
    steps:
      # Checks out the repository under $GITHUB_WORKSPACE
      - uses: actions/checkout@v2
      - name: Display text
        run: echo Github self-hosted runner working
```

3\. On GitHub, navigate to the **Actions** tab and click **Run workflow** from the page showing a workflow called **Test**, with a **workflow\_dispatch** event trigger.

This action lets you manually run your workflow.

![Running the workflow manually](https://adamtheautomator.com/wp-content/uploads/2023/11/image-189.png)

Running the workflow manually

If everything works in your workflow, you’ll have the following output.

![Testing the workflow](https://adamtheautomator.com/wp-content/uploads/2023/11/image-188.png)

Testing the workflow

4\. Finally, reconfirm the runner is in use by checking the workflow logs. As indicated below, logs from the **Set up job** step show the **Runner name** and **Machine name.**

Confirm that you see the one you noted in step four of the “Deploying and Configuring the GitHub Self-Hosted Runner” section.

![Confirming the GitHub self-hosted runner is in use](https://adamtheautomator.com/wp-content/uploads/2023/11/image-187.png)

Confirming the GitHub self-hosted runner is in use

## Conclusion

In this tutorial, you’ve learned to set up the GitHub ARC, providing a centralized control point for orchestrating your workflows. Following that, you touched on deploying and configuring your GitHub self-hosted runner, turning it into a star performer in your development pipeline.

You now have a streamlined and adaptable workflow that aligns with your needs. But moving forward, why not expand your knowledge by exploring advanced [GitHub Actions](https://github.com/actions/actions-runner-controller) features? Customize workflows for different scenarios and continuously optimize your CI/CD processes.

Related:[Effectively Manage GitHub Actions Artifacts to Deploy Releases](https://adamtheautomator.com/github-actions-artifacts-2/)

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fgithub-arc%2F&text=Using%20GitHub%20ARC%20to%20run%20Self-Hosted%20Runners%20on%20Kubernetes)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fgithub-arc%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fgithub-arc%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2022/06/Effortless-Storage-Management-With-Kubernetes-PVC.jpg)

### [Kubernetes PVC for Data Reliability: A Comprehensive Guide](/kubernetes-pvc/)

Tired of Kubernetes storage headaches? Discover how Kubernetes PVC simplifies data persistence and ensures your applications stay up and running.

![](https://adamtheautomator.com/wp-content/uploads/2024/01/kustomize.jpg)

### [A Beginners Guide to Kubernetes Kustomize](/kustomize/)

Dive into Kubernetes Kustomize to master dynamic deployments — A beginner’s guide for personalized configurations and seamless adaptability!

![](https://adamtheautomator.com/wp-content/uploads/2022/06/How-to-Keep-Kubernetes-Secrets-Safe.jpg)

### [Kubernetes Secrets Management: Enhance Safety & Reliability](/kubernetes-secrets/)

Explore expert techniques for securing Kubernetes secrets in production with this guide. Learn to enhance safety and reliability in your Kubernetes deployments.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
