---
title: "Ephemeral CI Runners on Kubernetes with Actions Runner Controller (ARC) and eBPF Isolation"
description: "Leverage ephemeral CI runners on Kubernetes using Actions Runner Controller (ARC) for scalability, combined with eBPF isolation for enhanced security."
pubDate: 2026-11-24T08:00:00.000Z
category: "devops"
tags: ["ci-cd","github-actions","kubernetes","devops"]
readTime: "5 min"
---

### Architectural Evolution
Traditional CI/CD pipelines often rely on dedicated, long-lived build agents that can become bottlenecks and pose maintenance challenges. The shift towards ephemeral CI runners addresses these issues by dynamically provisioning and tearing down resources for each job execution, ensuring optimal resource utilization and faster build times. However, managing security in such an environment can be complex. This is where Actions Runner Controller (ARC) paired with eBPF isolation comes into play, offering a scalable and secure solution for running GitHub Actions on Kubernetes.

### Technical Mechanics & How It Works
Actions Runner Controller (ARC) automates the deployment of GitHub Actions runners on Kubernetes clusters. Each runner is ephemeral, meaning it is created specifically for a job and destroyed afterward. This approach minimizes resource wastage and enhances scalability. ARC leverages Kubernetes' native capabilities to manage the lifecycle of these runners efficiently.

eBPF (Extended Berkeley Packet Filter) is used to provide fine-grained isolation between runners. By leveraging eBPF programs, ARC can enforce security policies at the kernel level, ensuring that each runner operates in a secure and isolated environment. This integration significantly reduces the risk of cross-job contamination and enhances the overall security posture of the CI/CD pipeline.

### System Architecture Diagram
```mermaid
flowchart TD
    subgraph GitHub
        A[GitHub Actions]
    end
    subgraph KubernetesCluster
        B[Actions Runner Controller]
        C{Runner Pod}
        D[eBPF Programs]
    end
    A -->|Triggers Workflow| B
    B -->|Creates Runner Pod| C
    C -->|Executes Job| A
    C -->|Enforces Security Policies| D
    C -->|Terminates After Job| B
```

### Production-Ready Implementation
Below is a simplified example of how to deploy Actions Runner Controller with eBPF isolation on a Kubernetes cluster. This example assumes you have a Kubernetes cluster set up and `kubectl` configured to interact with it.

**Deploy Actions Runner Controller:**
```yaml
apiVersion: v1
kind: Namespace
metadata:
  name: actions-runner-system

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: runners.actions.summerwind.dev
spec:
  group: actions.summerwind.dev
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
  scope: Namespaced
  names:
    plural: runners
    singular: runner
    kind: Runner
    shortNames:
      - runner

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: actions-runner-system
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      containers:
        - name: manager
          image: summerwind/actions-runner-controller:v0.24.0
          args:
            - "--leader-elect"
            - "--metrics-bind-address=0"
          env:
            - name: ACTIONS_RUNNER_LABELS
              value: kubernetes
            - name: GITHUB_TOKEN
              valueFrom:
                secretKeyRef:
                  name: github-secret
                  key: token
```

**Configure eBPF Isolation:**
For eBPF isolation, you would typically use a tool like Cilium, which integrates eBPF for network and security policies. Here's a snippet to install Cilium on your Kubernetes cluster:

```bash
# Install Cilium CLI
curl -L --fail https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz | tar xzv
sudo mv cilium /usr/local/bin

# Install Cilium
cilium install
```

After installing Cilium, you can define network policies and other security measures using eBPF to isolate your CI runners.

### Migration Strategy & Operational Gotchas
**Prerequisites:**
- Ensure your Kubernetes cluster meets the requirements for deploying Actions Runner Controller.
- Have a GitHub Personal Access Token (PAT) with the necessary permissions.

**Deprecation Warnings:**
- Keep your Actions Runner Controller and related tools up to date to benefit from the latest features and security patches.

**Edge Cases to Watch Out For:**
- Monitor the performance and resource usage of ephemeral runners to avoid overloading your Kubernetes cluster.
- Regularly review and update your eBPF policies to adapt to new security threats.

**Observability Instrumentation:**
- Use tools like Prometheus and Grafana to monitor the health and performance of your CI runners.
- Implement logging solutions to capture detailed logs for troubleshooting and auditing purposes.