-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
On Linode, external-dns is creating CNAME alias and no TXT/A Records when target is Load Balancer #2499
Comments
Having chatted with @jpetazzo (creator of Linode's tutorial mentioned above), it does look like the reason might be because of external-dns's logic to create a CNAME if the target looks like an ELB. Setting the --txt-prefix flag, as per #262, gets around the issue of the TXT not being created. I believe that the logic of detecting an ELB should be changed. If the LoadBalancer has an IP address and not a domain name, this logic/change from A Record to CNAME does not seem necessary. Furthermore, applying the |
I think I'm hitting a similar issue after upgrading my LKE cluster from 1.20 to 1.22. I'm using traefik When I enable debug logs I see:
Note the empty I noticed the new domain on my new nodebalancer and eventually found https://www.linode.com/blog/linode/notice-changes-to-members-linode-com-and-nodebalancer-linode-com/ -- My cluster had been up for over a year so I hadn't noticed earlier. Seems like it could be related. Prior to this I'd run into #961 -- I've verified the RBAC rules appear to be correct, and |
same behaviour for me than @peedrr described it.. |
For me too, same behaviour than @peedrr described it. |
Is there an annotation to force an A record rather than a CNAME record? You can't use a CNAME at the base of a domain and external-dns has no way to know if a record will be the base or not. A user hint seems the only way out. |
I hope I'm not muddying the waters in case my issues are unrelated, but I'm not seeing that it's a unique issue just yet. In my case, I'm running traefik ingress, with these
In case its relevant, the service is also configured with:
Before upgrading my clusters (1.20)/nodebalancer, Runtime configs:
... passing
At least in my case I never intended to create a
Not that I could find: https://github.com/kubernetes-sigs/external-dns/blob/master/source/source.go#L40 |
The root of this issue, as mentioned before, is that you need to add a prefix or suffix to the TXT record so that it has a unique hostname. In the official Helm chart, this is accomplished via something like: spec:
values:
registry: txt
txtOwnerId: ""
txtPrefix: ""
txtSuffix: "_externaldns" After hitting the issue described, the above fixed my issues on LKE 1.22 (for services, at least -- haven't tested with ingress like @mars64 was mentioning). The same principals from the AWS FAQ entry you mentioned apply. More discussion is also in this StackOverflow. I do agree that the auto-detection logic should probably be changed, though. |
After looking into this more, the behavior has definitely changed since the rollout of the new subdomain for nodebalancers. Using Now, a target like Previously, the Go playground to demonstrate it. Really weird behavior. Still looking more into it, but hopefully this clarifies why it's happening. EDIT: it's because string comparisons like greater/less than compare alphabetically (lexicographically). Since |
Indeed. This seems like behavior that should be configurable (to choose the service IP or choose the hostname (CNAME)). |
I think this might be related. I've recently found that when adding the service.beta.kubernetes.io.do-loadbalancer-hostname annotation to external-dns's service, it causes external-dns to create CNAMEs rather than A records. Perhaps that because this setting replaces status.LoadBalancer.ingress.ip="1.2.3.4" with status.LoadBalancer.ingress.hostname="example.com" and it doesn't have an IP address to which to point A records. That's a digitalocean specific setting, but I suspect there are equivalents for other providers? Is that behavior expected, and likely an unavoidable consequence? |
What happened:
What you expected to happen:
A & TXT Records created, as per Linode's tutorial video which uses the same commands (below)
How to reproduce it (as minimally and precisely as possible):
(Assumes existing access to Linode, Linode API key and Bitnami helm repo, with mydomain.com managed by Linode DNS)
Anything else we need to know?:
Not sure if this is related, but I saw in FAQs that external-dns creates CNAME "when target looks like an ELB" on AWS. The FAQ then gives AWS-specific solution which obviously doesn't work on Linode. Maybe something similar is happening here?
Environment:
external-dns --version
): 0.10.2The text was updated successfully, but these errors were encountered: