Replies: 6 comments 4 replies
-
Thanks for reporting this issue, I do have a feeling this needs to be documented more or maybe other people can share their experiences and what's causing the issue and how they fixed it. There's not only a difference in ubuntu or fedora but also in the way people handle DNS at home. It's all over the place so it's hard to have one fix for all situations. Search domains in I'll go ahead and convert this into a GH discussion. I suggest people post here their problems and what they did to mitigate DNS issues. |
Beta Was this translation helpful? Give feedback.
-
Just thought I'd document the problem as I saw it. I don't think my solution is really mergeable in the current state as it feels too jank. CauseAs you mentioned, systemd-resolved is ultimately the root cause of this. It'll override Janky Solutioncluster-installation.yaml - name: Fix DNS for ubuntu
block:
- name: Stop and disable service which messes with DNS
service:
name: "systemd-resolved"
state: stopped
enabled: false
- name: Delete link to the systemd-resolved resolv.conf
ansible.builtin.file:
path: /etc/resolv.conf
state: absent
- name: Create empty resolv.conf
ansible.builtin.file:
path: /etc/resolv.conf
state: touch
- name: Setup nameserver
blockinfile: |
dest=/etc/resolv.conf
content="nameserver 10.0.90.121"
when: ansible_facts['distribution'] == 'Ubuntu'
Make this change, run your Ansible playbook and kill your kube-system/coredns pod, DNS should start working for you. (If it doesn't see Basically, we're just killing the service which messes with our resolv.conf and updating the file to have a known good DNS to handle queries for us, this could be changed to an internal DNS if you wanted to as well. For some odd reason, it didn't apply for me, so I needed to add this into the group vars as well. This should be the implied value, I don't really understand why I need to do this... kubelet-arg:
# Don't pull /etc/resolv.conf from host
- "resolv-conf=/etc/resolv.conf" For a non jank solution, I think we would try to see if DNS resolution works in a known broken pod, then do this fix if needed and restart the CoreDNS deployment so that no human intervention is required and it's idempotent. I think I'll leave it here for now. |
Beta Was this translation helpful? Give feedback.
-
DNS search domains in /etc/resolv.conf on my nodes were causing issues with external DNS resolution (thanks pfSense). I was able to fix it using @Tyler-Cash's addition to cluster-installation.yaml.
There's not really a non-jank solution for those of us experiencing this issue since it's an upstream issue from DHCP like @onedr0p mentioned. |
Beta Was this translation helpful? Give feedback.
-
that seemed to have solved the issue, minor thing tough, if one disables |
Beta Was this translation helpful? Give feedback.
-
It appears future versions of Alpine Linux will hopefully fixed this once and for all. |
Beta Was this translation helpful? Give feedback.
-
On Debian 12 this is much easier to fix. According to the Debian docs on resolv.conf you can just do the following. During the editor command your
|
Beta Was this translation helpful? Give feedback.
-
Initially Flux setup failed because I was getting
confirmed that it was dns issue by running
dig
andnslookup
from within a Pod I deployed for test purposes.Even joined Discord to see if any information there and found this thread: https://discord.com/channels/673534664354430999/1074532630395105341
From there I got a link to recently merged PR #627, If I removed the changes made there DNS resolution started to work again from the Pods.
Host Details:
Ubuntu 22.04
So the change might work for Fedora hosts, but not Ubuntu. Imho need to revisit this or provide a doc or have step in ansible playbook that during
install
is Ubuntu specific and makes sure that DNS worksBeta Was this translation helpful? Give feedback.
All reactions