NinjaOps Guides › CI/CD & Infrastructure
dev0ps-20).
GitHub-hosted runners provide a quick way to execute CI/CD workflows, but as build concurrency and resource demands grow, public runner costs soar. Setting up self-hosted GitHub Actions runners on Kubernetes or dedicated cloud VMs gives engineering teams full control over CPU/RAM allocation, GPU acceleration, private VPC access, and custom build Caching.
This complete architecture guide covers deploying ephemeral runner pods on Kubernetes using actions-runner-controller (ARC), optimizing Docker layer caching, and hardening runner security against malicious pull requests.
Running persistent VMs for self-hosted runners creates state pollution across builds and introduces security risks. Ephemeral runners destroy the container pod immediately after executing a job, guaranteeing a clean workspace.
# Install Actions Runner Controller via Helm
helm repo add actions-runner-controller https://actions-runner-controller.github.io/actions-runner-controller
helm repo update
helm upgrade --install arc actions-runner-controller/actions-runner-controller --namespace arc-systems --create-namespace --set authSecret.github_token="ghp_YourGitHubPATTokenHere"
Heavy Docker builds and multi-arch image compilations can cause runner pods to exceed cgroup limits, resulting in silent failures like Docker Exit Code 137 (OOMKilled) or Docker Sock Permission Denied errors.
Scale your build infrastructure and secure runner credentials with these top-rated DevOps tools:
Never enable self-hosted runners on untrusted public repositories without fork protection. Malicious pull requests can execute arbitrary code inside your VPC. Enforce ephemeral: true and strictly isolate runner service accounts using Kubernetes RBAC and network policies.
Discover step-by-step troubleshooting solutions and architecture guides across our hubs: