A Kubernetes controller for managing self-hosted GitHub Actions runners at scale. This project automates the deployment, scaling, and management of GitHub Actions runners on your Kubernetes cluster, making CI/CD workflows more efficient, secure, and customizable.
- Automated Runner Provisioning: Dynamically launches and terminates self-hosted runners as needed.
- Runner Autoscaling: Scales runners up or down based on job demand or custom metrics.
- Multi-Repository Support: Supports runners for multiple GitHub repositories, organizations, or enterprises.
- Secure by Design: Leverages Kubernetes RBAC and secrets to keep sensitive data safe.
- Custom Runner Images: Use your own container images for specialized build environments.
- Management API: Integrates with GitHub’s REST API for seamless runner registration and deregistration.
- Kubernetes cluster (>=1.22 recommended)
- kubectl configured for your cluster
- GitHub Personal Access Token with
repo
andadmin:org
scopes - Helm (optional, for easier installation)
git clone https://github.com/nodoubtz/actions-runner-controller.git
cd actions-runner-controller
kubectl apply -f config/crd/
kubectl apply -f config/deploy/
Or use Helm:
helm repo add arc https://nodoubtz.github.io/actions-runner-controller/
helm install actions-runner-controller arc/actions-runner-controller
Create a RunnerDeployment
YAML manifest:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: example-runner-deployment
spec:
replicas: 2
template:
spec:
repository: nodoubtz/actions-runner-controller
image: summerwind/actions-runner:latest
env: []
Apply it:
kubectl apply -f runner-deployment.yaml
Check runner pods:
kubectl get pods -l app=actions-runner-controller
kubectl get runners
- GitHub Token: Store your token as a Kubernetes Secret and reference it in your runner spec.
- Custom Runner Images: Specify the
image
field in the runner spec. - Scaling: Adjust the
replicas
field or use the HPA integration.
See docs/
for more advanced configuration options.
- Runners are isolated in Kubernetes pods.
- Sensitive tokens and secrets are mounted via Kubernetes Secrets.
- RBAC is enforced for all controller operations.
- Fork the repo
- Create your feature branch (
git checkout -b feature/my-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/my-feature
) - Open a Pull Request
References: