Avoiding Kubernetes waiting for pods

I am using the gitlab-runner-0.43.0 15.2.0 helm chart in a private Kubernetes cluster on a self hosted Gitlab.

The redacted configuration looks like:

runners:
  config: |
    [[runners]]
      [runners.kubernetes]
        image = "ubuntu:20.04"
        privileged = true
      [[runners.kubernetes.volumes.empty_dir]]
        name = "docker-emptydir"
        mount_path = "/var/run"
        medium = "Memory"

It was quite a pain to get .gitlab-ci.yml of the style:

image: docker:latest

services:
  - docker:dind

Finally with the mount_path lines (I think) I found off SO, I think it’s working… :sweat_smile:

My next issue is how to make it better performing. We see these ContainersNotReady messages and it takes about 10s to spin up a job. How do make this faster? It’s not clear by looking at the documentation if I need to tweak concurrent or replicas. Any advice please?

Hi @hendry

you are waiting for your Kubernetes cluster to spin up a Pod for job. This has nothing to do with concurrent or replicas setting.

You need to look at your k8s cluster and why it takes 10s to start a Pod.