<p>I have install bitnami/external-dns on my EKS Kubernetes cluster. The role of the pod is to create new records in my Route53 hosted zone once an Ingress expects the records to be there. No problems to this point.</p>
<p>But when removing the Ingress, the Route53 records are not deleted. What is expected to delete these records? What do I do wrong?</p>
<p>Installation of External DNS</p>
<pre><code>helm install extdns bitnami/external-dns \
--set provider=aws \
--set interval=1m \
--set logLevel=debug \
</code></pre>
<p>The Ingress</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: {{$.Chart.Name}}-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxxxxx:certificate/some-uuid
    alb.ingress.kubernetes.io/listen-ports: '[{&quot;HTTP&quot;: 80}, {&quot;HTTP&quot;: 81}, {&quot;HTTPS&quot;:443}]'
    external-dns.alpha.kubernetes.io/hostname: zzz1.blah.nl
  labels:
    app: {{$.Chart.Name}}-service
spec:
  rules:
    - host: zzz1.blah.nl
      http:
        paths:
          - path: /*
            backend:
              serviceName: {{$.Chart.Name}}-service
              servicePort: 8080
    - http:
        paths:
          - path: /zzz1/*
            backend:
              serviceName: {{$.Chart.Name}}-service
              servicePort: 8080
</code></pre>
<p>External DNS logging</p>
<pre><code>time=&quot;2021-05-05T20:31:02Z&quot; level=debug msg=&quot;Refreshing zones list cache&quot;
time=&quot;2021-05-05T20:31:02Z&quot; level=debug msg=&quot;Considering zone: /hostedzone/xxxx (domain: local.)&quot;
time=&quot;2021-05-05T20:31:02Z&quot; level=debug msg=&quot;Considering zone: /hostedzone/xxxx (domain: blah.nl.)&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service kube-system/aws-load-balancer-webhook-service&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service default/extdns-external-dns&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service default/module1-service&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service default/kubernetes&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service kube-system/kube-dns&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service kubernetes-dashboard/kubernetes-dashboard&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;No endpoints could be generated from service kubernetes-dashboard/dashboard-metrics-scraper&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Endpoints generated from ingress: default/module1-ingress: [zzz1.blah.nl 0 IN CNAME  k8s-default-module1i-0000000-1693479811.us-west-2.elb.amazonaws.com [] zzz1.liberaalgeluid.nl 0 IN CNAME  k8s-default-module1i-000000-1693479811.us-west-2.elb.amazonaws.com []]&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Removing duplicate endpoint zzz1.blah.nl 0 IN CNAME  k8s-default-module1i-000000000-1693479811.us-west-2.elb.amazonaws.com []&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Modifying endpoint: zzz1.blah.nl 0 IN CNAME  k8s-default-module1i-000000000-1693479811.us-west-2.elb.amazonaws.com [], setting alias=true&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Modifying endpoint: zzz1.blah.nl 0 IN CNAME  k8s-default-module1i-000000000-1693479811.us-west-2.elb.amazonaws.com [{alias true}], setting aws/evaluate-target-health=true&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Refreshing zones list cache&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Considering zone: /hostedzone/Z000000000 (domain: blah.nl.)&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=debug msg=&quot;Considering zone: /hostedzone/Z000000000 (domain: local.)&quot;
time=&quot;2021-05-05T20:31:03Z&quot; level=info msg=&quot;All records are already up to date&quot;
^
</code></pre>

<p>The default <code>--policy</code> option in the Chart is <code>upsert-only</code>, this is different from the underlying default in ext-dns itself which is <code>sync</code>. In <code>upsert-only</code> mode, it will not delete anything. This is usually for safety as cleanup can happen in batches and under user supervision. You can override the policy value back to <code>sync</code> if you would like though (<a href="https://github.com/bitnami/charts/blob/05a5bd69206574f3f8638197eb98da2164343a42/bitnami/external-dns/values.yaml#L432" rel="nofollow noreferrer">https://github.com/bitnami/charts/blob/05a5bd69206574f3f8638197eb98da2164343a42/bitnami/external-dns/values.yaml#L432</a>).</p>
