Closed saifulhoque26 closed 2 months ago
Question 1: is there any way to have 1 dnsname as target and create an A record? If its not possible, is that in the roadmap?
If you are using a AWS Route 53 hosted zone and the target is a Amazon load balancer name, an ALIAS
record is created instead the CNAME
record automatically which is normally the same as a A record.
In the general case, is it not possible and it is also not on the roadmap. Why do you want to have an A
record here? Why is a CNAME
record not good enough?
The feature with multiple domain name targets is meant to help in situations where you cannot use a CNAME
DNS record.
Do you think if we will face any issue with this approach to create an A record?
The dns-controller-manager must lookup the IP address of the targets periodically and updates the DNS record if needed.
Therefore it is only best effort and not of on the same reliability level as a CNAME
record.
As it happens to be checked only every 10 mins by default, you may have observe service unavailability if the IP address changes. You may reduce this period by setting spec.cnameLookupInterval
in the DNSEntry, but you can still have a short time with the outdated target IPs. Depending on the TTL
of the record, the lookup on the upstream DNS server may return an outdated IP address for the TTL
time period.
If you are using a AWS Route 53 hosted zone and the target is a Amazon load balancer name, an ALIAS record is created instead the CNAME record automatically which is normally the same as a A record.
By Amazon load balancer name, do you mean the value of "dns.gardener.cloud/dnsnames:" key in the kubernetes Service resource? Or the value of statue.loadBalancer.ingress.hostname
?
We set the value of "dns.gardener.cloud/dnsnames:" in the target of DNSEntry. But it created a CNAME record.
We need to have an A
record, because In our kubernetes cluster, we have external Routing enabled.
There is an external Routing from a CNAME record that targets the ´dnsName´of the DNSEntry
which has also CNAME record. Therefore, we have CNAME cascading, which is not a recommended setup.
So, we need to create an A record.
If you are using a AWS Route 53 hosted zone and the target is a Amazon load balancer name, an ALIAS record is created instead the CNAME record automatically which is normally the same as a A record.
By Amazon load balancer name, do you mean the value of "dns.gardener.cloud/dnsnames:" key in the kubernetes Service resource? Or the value of statue.loadBalancer.ingress.hostname ?
All AWS application and classical load balancers with domains ending e.g. with us-east-2.elb.amazonaws.com
(complete list here) are translated into A records automatically. But this happens in the AWS Route53 service itself. So it does no apply in your case.
We set the value of "dns.gardener.cloud/dnsnames:" in the target of DNSEntry. But it created a CNAME record. We need to have an A record, because In our kubernetes cluster, we have external Routing enabled.
Thanks for providing more details. But I think it is out of scope of the dns-controller-manager. As already mentioned the feature for multiple targets is only a work around as there is no DNS record like CNAMES
where you can provide multiple target domains.
We can not give any guarantees about the IP lookup, especially which DNS servers are used. Only you in your application know, when the IP address behind the domain name may change and which DNS servers to use to get an immediate update.
What would you like to be added: Creating
A
DNSRecord with DNSEntry with 1 target with DNSname.Why is this needed:
If I understand it correctly, to create a A record in Route53 HostedZone, the DNSEntry needs to have IP as target
or have multiple DNS name as target:
And to create a CNAME record, the DNSEntry must have a single DNS name is in the target.
Currently to force create an A record, we are adding a subdomain as target:
This creates an A record. But in the end we see 1 IP as target as expected.
Is there any way to have 1 dnsname as target and create an A record? If its not possible, we would like to request a feature to enable us create an A record from DNSEntry with a single dnsname target.