1

I'm using EKS, Route53 and External-dns for my DNS records.

Here is the nginx-ingress I'm currently using

nginx-ingress:
  controller:
    config:
      use-forwarded-headers: "true"
    service:
      annotations:
        external-dns.alpha.kubernetes.io/access: private
        external-dns.alpha.kubernetes.io/hostname: gitlab.${var.gitlab-domain}, registry.${var.gitlab-domain}
        service.beta.kubernetes.io/aws-load-balancer-ssl-cert: ${data.aws_acm_certificate.cert.arn}
        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https
        service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
        service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
        alb.ingress.kubernetes.io/scheme: internet-facing
        ${var.gitlab-domain}/dns-type: private

My problem is even though I'm using this line: external-dns.alpha.kubernetes.io/access: private, external-dns will add records in both public and private route53 hosted zone. How to do to only have the records in my private zone?

For now, the only workaround I found is to not give the right on the public zone to route53, but it's not a long term solution.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
nomopo
  • 53
  • 1
  • 10

1 Answers1

1

I'm now using annotations filter

I have two external-dns one for the private zone one for the public

I add this to my external-dns helm chart:

set {
    name  = "annotationFilter"
    value = "company.com/dns-type in (private)"
}

And after in my nginx-ingress controller, in the annotations I can use this annotation:

company.com/dns-type: private
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
nomopo
  • 53
  • 1
  • 10
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/31257410) – bguiz Mar 14 '22 at 03:37
  • @bguiz It looks like an answer to me: the OP managed to solve their problem and posted how they did it. – Mark Rotteveel Mar 14 '22 at 14:44