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"
More on GitHub Actions and GitLab CI in Production
How do you organise reusable workflows for an organisation on GitHub?IntermediateHow do you reduce GitHub Actions minutes cost on private repos?IntermediateHow do you secure self-hosted runners?AdvancedHow do you design the GitHub Actions OIDC trust policy for AWS safely?AdvancedHow do you handle approvals and deployments across environments in GitHub Actions?IntermediateHow do you handle required checks when workflows use path filters or matrices?Advanced