Kubernetes Gitlab runner logs are blank when viewed using kubectl

Summary

When running a Gitlab runner in Kubernetes cluster, logs are viewable in the web UI, but tailing the pods the logs are blank. This prevents piping to log aggregator services like Papertrail or LogDNA.

Steps to reproduce

  1. Run a Gitlab runner in Kubernetes cluster.
  2. Find the pod.
  3. Tail the logs of either of the two containers in the pod:
kubectl logs runner-pod-name build
kubectl logs runner-pod-name helper
  1. Nothing will be seen, but checking the web UI, full logs can be seen.

Note, the logs of the master pod are present, eg:

Job succeeded                                       duration=1m37.329706783s job=194865368 project=1234567 runner=zVjVA
Job succeeded                                       duration=1m30.504253221s job=194865381 project=1234567 runner=zVjVA
Job succeeded                                       duration=1m55.193704251s job=194865366 project=1234567 runner=zVjVA

Expected behavior

You should be able to tail the runner logs of the pod.

Environment description

Problem exhibited with Gitlab runner helm chart 0.3.0, 0.4.0-beta and 0.5.0-rc

Used GitLab Runner version

Problem exhibited with runner version 11.9.0 and 11.10.0-rc1