kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.75k stars 2.58k forks source link

"A" records created for both, Endpoint and LB IP in Azure Private DNS #4819

Open makkes opened 1 month ago

makkes commented 1 month ago

What happened:

I have a Service with the following manifest:

apiVersion: v1
kind: Service
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: svc1.prod.domain.internal
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
status:
  loadBalancer:
    ingress:
    - ip: 10.2.2.7
[...]

Now ExternalDNS creates two A records for "svc1.prod.domain.internal", one for the IP address "10.2.2.7" (which is expected) and another one for the IP address "10.244.0.46" which is the IP address of the underlying Endpoint/Pod.

What you expected to happen:

A single A record pointing to "10.2.2.7" is created for "svc1.prod.domain.internal". No A record is created for the Endpoint IP.

How to reproduce it (as minimally and precisely as possible):

see above.

Anything else we need to know?:

Environment: