-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
[Bug]: autoscaled nodes have more than 3 DNS entries #1422
Comments
@tobiasehlert Thanks for reporting this. I had no idea on the number of nameservers limitation. Here are steps to fix it, I will try to address this later, but if you want to shoot a PR, don't hesitate please. Certainly. Let's recap the solution to your DNS configuration issue with kube-hetzner:
Remember, the key is to ensure that your DNS configuration provides adequate resolution for both IPv4 and IPv6 as needed by your cluster, while staying within the 3-nameserver limit imposed by Kubernetes. |
hi @mysticaltech, I've had some progress on the cloud-init stuff, but want to check with you on some things.. It seems like it takes a while and then the autoscaler node actually gets updated and has other DNS settings than right after start. I guess that the K8s stuff start before the networking things are fully settled yet, but I'm not sure on that part. Anyhow, it looks to me that there is an edit of the /etc/resolv.conf file through cloudinit_write_files_common (in addition to modifying /etc/NetworkManager/conf.d/dns.conf) with this: write_files:
- content: |
nameserver 185.12.64.1
nameserver 185.12.64.2
nameserver 2a01:4ff:ff00::add:1
path: /etc/resolv.conf
permissions: '0644' I read some in the documentation of cloud-init and even there are some ways forward..
If using option 1, it would look something like this: manage_resolv_conf: true
resolv_conf:
nameservers:
- 185.12.64.1
- 185.12.64.2
- 2a01:4ff:ff00::add:1 What would you prefer? |
@tobiasehlert Thanks for this and sorry for the late reply. If the second option via |
I previously used https://github.com/vitobotta/hetzner-k3s and encountered the same problem there. As a workaround, I added the following two commands to the post_create_commands to remove one of them:
|
Description
This is the error returned by multiple pods on my autoscaler nodes:
Apparently k8s only support 3 entries for DNS servers (source #689).
When looking on both worker and autoscaler nodes, here is how the /etc/resolv.conf looks on two servers for comparison.
So my initial though is that that there is something missing when booting a autoscaler node that gets bootstraped with cloudinit_config, but what I haven't figured out yet.
Kube.tf file
Screenshots
No response
Platform
Linux
The text was updated successfully, but these errors were encountered: