Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you manage GitLab Runner autoscaling on Kubernetes or cloud VMs?

AdvancedProductionGitHub Actions and GitLab CI in Production
Answer

For Kubernetes, install the runner with the official Helm chart: each job becomes a pod, and the cluster autoscaler (or Karpenter) adds nodes. Set concurrent, poll_timeout, pod resource requests/limits, and node selectors for build pools (spot nodes). For VM-based autoscaling, the docker-autoscaler or instance executor with the fleeting plugin (AWS ASG, GCP MIG) replaces the deprecated Docker Machine executor. Watch job queue duration, and cap concurrent to protect shared services like registries.

concurrent = 40
[[runners]]
  executor = "kubernetes"
  [runners.kubernetes]
    namespace = "gitlab-runners"
    cpu_request = "1"
    memory_limit = "4Gi"
All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production