Kubernetes with Calico Gitlab Runner Pods can't reach external API

9/23/2019

I've deployed a bare-metal Kubernetes cluster with Calico networking. I'm successfully able to communicate between pods and from external network to pods using Ingress. When I use Dashboard EXEC function the pod is able to fetch external resource (DNS works, PING works, CURL works), but the pod process itself is failing.

What should I check next? Do you need more info to analyze it?

UPDATE

Issue is related to Gitlab Runner only.

-- Jan Zahradník
calico
gitlab
gitlab-ci-runner
kubernetes
networking

1 Answer

9/23/2019

Finally it turned out that the problem was not with whole Kubernetes cluster, but related only to Gitlab Runner. Thanks to this issue it works again:

Successfully able to complete builds by adding the network to the build command --network host

build:
  script: 
    - docker build --network host .

This requires a .gitlab-ci.yml and excludes autodevops.

-- Jan Zahradník
Source: StackOverflow