-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS resolution stop working after k3s installation #3624
Comments
I run K3s extensively on Ubuntu, and QA validates on it as well. I can't reproduce this issue. Can you share any more information about your environment or workload? |
Hi Brandond, Thanks for a prompt reply. I've just installed a fresh copy of ubuntu on raspberry pi and the dell machine. Raspberry pi is a master node and dell is a worker node. Now DNS is working on the host machine and pods on the master node but doesn't work inside pods on the dell machine. It's a fresh installation. Here is a copy of
|
That sounds like cluster networking (flannel CNI) isn't working. Can you confirm that you've disabled firewalld/ufw on both nodes, and that there's not anything else between the two filtering traffic? |
Both firewalld and ufw are disabled, there is no firewall in between. Master node is successfully deploying pods. Just pods on the worker nodes can't resolve. |
The issue is related to Ubuntu 21.04. I've tried Ubuntu 21.04 on few different machines but the same result. After downgrading to Ubuntu 20.04 everything is working fine. |
Interesting. I believe we only technically support LTS releases of Ubuntu, but this is worth looking into regardless. |
@umairyounus, I'm using Ubuntu Server 21.04 and for me K3s and DNS is working fine. Installed K3s with k3sup. Should not have commented, bad luck. Few minutes ago I ran
Reinstalled K3s and now it works again (all my persistent storage is using |
I resolved this with K3s v1.19.13 on Ubuntu 21.04 on RaspberryPi 4B wby using I was experiencing DNS resolution issues in pods (works fine on host) I have 4 Ubuntu 21.04 Nodes running Ubuntu 21.04, I installed with k3sup Maybe 21.04 has issues with vxlan? |
Same for me, also switched to |
I experienced the same issue on Ubuntu 20.04, and the following helped me (maybe not ideal, but worked for me): |
And you kept vxlan mode? |
Also having the same issues with ubuntu 21 |
Hey, I am experiencing this too.... I have a k3s cluster that I just rebuilt from scratch (because I thought this issue would go away with a fresh build... nope) Happy to try anything and debug anything as this cluster is now useless until I get this sorted. Setup master node - Pi4B 8GB Installed Ubuntu Server 64 via raspberry pi imager tool.
change hostnames to kmaster, knodea, knodeb, knodec then install k3s
Do the container thing with cmdline.txt ( added a few secrets, some pvcs etc.. to support the deployments. Pods download fine (DNS still works fine on hosts when you ssh onto them) Pods that run code that calls to the outside world (in this case bitbucket api) fail with errors like
I tried @sonicbells 'fix' and rebooted that node as well, deleted and redeployed the pod, no change, same failure. Generally running a fresh stock install. Getting desperate here. I have gone through all the K3S 'Debugging DNS issues' steps and simply found out that... my DNS doesn't work, but I don't know how to solve it. This cluster was previously running 19.04 I think and it worked fine with no extra steps, but one node failed, I had to rebuild it, RPI Imager didn't have that any more so I used 21.04 and the pod needs to be on that node, so nothing was working... assumed a full rebuild would help, so built all 4 nodes with 21.04 and it fully doesn't work now. UPDATE: I found this article as @xtenduke above mentioned using flannel ... I followed this tutorial to install it, deleted my pod, and recreated it, but the only thing that has changed is the calls now time out as opposed to being unable to resolve. |
Really weird I wonder why it started to work again for me using Ubuntu 21.04 after creating a K3s cluster from scratch |
Due to work pressure I might not be able to keep this whole cluster for debugging. Going to roll it back to 19.04 and build up from there. I have one spare 4B 8GB I could create a single node cluster on that to debug if needed
… On 6 Sep 2021, at 17:52, Tim Schwenke ***@***.***> wrote:
Really weird I wonder why it started to work again for me using Ubuntu 21.04 after creating a K3s cluster from scratch
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#3624 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAIBFILHTCHPUS3Q6J3VQDDUATWT3ANCNFSM5AJGW34Q>.
|
Had the same issue with DNS not resolving using Ubuntu 21.10 on VMs.
Installed with k3s-ansible using the options DNS was unable to resolve anything from within the pods. After changing my server arguments to |
This is a duplicate of #4188 |
Was hitting the same DNS issue on a bootstrapped kubeadm cluster running on RHEL 8.4 servers with Flannel network installed. Changing the Backend Type in
|
Environmental Info:
K3s Version:
k3s version v1.21.2+k3s1 (5a67e8d)
go version go1.16.4
Node(s) CPU architecture, OS, and Version:
Linux dell1 5.11.0-22-generic #23-Ubuntu SMP Thu Jun 17 00:34:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
1 server, 3 agents
Describe the bug:
After doing a fresh installation of the ubuntu 20.01 server, when I installed k3s the DNS resolution on the machine stops working. DNS resolution doesn't work on the host machine and inside the pods as well. I've tried it on a few different machines same behaviour.
DNS works fine before k3s agent installation, looks like there is some kind of conflict.
Steps To Reproduce:
Fresh ubuntu-21.04 installation
install k3s as an agent
Installed K3s:
Expected behavior:
DNS resolution should work
Actual behavior:
name resolution failed
Additional context / logs:
/ # ping google.com
ping: bad address 'google.com'
The text was updated successfully, but these errors were encountered: