DNS problem on kubernetes

Hello,

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 10.43.0.10:53: read udp 10.42.1.12:40252->10.43.0.10:53: 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:

Thanks!!

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
Server:		10.43.0.10
Address:	10.43.0.10:53

Non-authoritative answer:
Name:	github.com
Address: 192.30.255.113

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