DNS problem on kubernetes


I’m having this problem while logging in to my drone deployment on kubernetes:

Login Failed. Get "https://api.github.com/user": dial tcp: lookup api.github.com on read udp> i/o timeout

When I was able to login, my build was failing at clone with could not resolve github.com.

Due to both these issues I’m assuming something wrong with the DNS setup, but I’m not sure how to diagnose the problem.

I’ve had the same problem with drone in a previous kubernetes cluster, but I thought I screwed something up in it and did not dig deeper. However, last week, I set up a fresh kubernetes and the same problem popped up immediately.

Hello Bakir,

Can you please confirm if from this K8s cluster, you are getting a valid output for following commands:


nslookup results are a bit weird. It works on a demo pod and the main drone pod, but fails for the runner:

$ kubectl -n drone exec --stdin --tty drone-79f764d7c9-gh2kh -- /bin/sh 
/ # nslookup github.com

Non-authoritative answer:
Name:	github.com

$ kubectl -n drone exec --stdin --tty drone-runner-64d8cf79db-hrpss -- /bin/sh  
/ # nslookup github.com
nslookup: can't resolve '(null)': Name does not resolve