External-dns: External DNS should create CNAME for External LBs

Created on 19 Jan 2018  路  3Comments  路  Source: kubernetes-sigs/external-dns

In AWS most ELBs have multiple public IP addresses. I've noticed the EDNS (installed with Helm) creates just one A record for one of the ELB's IP addresses. Shouldn't it create a CNAME to the ELB's FQDN instead? At the very least it should create one A record for every IP the ELB has.

Most helpful comment

This problem is was fixed. The problem was not with EDNS, but with nginx-ingress. To use in AWS with one ELB and external-dns install it this way:

 helm install stable/nginx-ingress --wait \
    --set controller.publishService.enabled=true \
    --set controller.publishService.pathOverride=kube-system/nginx-ingress-controller \
    --namespace=kube-system --name=nginx-ingress

  helm install stable/external-dns --wait \
    --set policy=sync \
    --set source=ingress \
    --namespace=kube-system --name=external-dns

All 3 comments

that's exactly what it should do (CNAME/ALIAS pointing to ELB dnsname). Few questions:

  1. Which AWS region and Availability zone you are running ExternalDNS in?
  2. What is the output of kubectl get <resource_type> <resource_name> -o yaml ?

I see. Very likely I don't understand how ingress and EDNS are supposed to work together. Ingress-nginx creates an ELB, which I assume all inbound service traffic is supposed to use. Configuring a service to be NodePort creates, as you say, an A record that points to a node. As does the default service type of Cluster IP.

A service of LoadBalancer still creates an additional load balancer. It is my understanding that some configuration should create a CNAME to the existing ingress ELB which will forward traffic to the correct node. In this way only one ELB is required.

Is this possible?

This problem is was fixed. The problem was not with EDNS, but with nginx-ingress. To use in AWS with one ELB and external-dns install it this way:

 helm install stable/nginx-ingress --wait \
    --set controller.publishService.enabled=true \
    --set controller.publishService.pathOverride=kube-system/nginx-ingress-controller \
    --namespace=kube-system --name=nginx-ingress

  helm install stable/external-dns --wait \
    --set policy=sync \
    --set source=ingress \
    --namespace=kube-system --name=external-dns
Was this page helpful?
0 / 5 - 0 ratings