External-dns: Wrong Service Always Assigned With Mulitple Nginx Ingress

Created on 17 May 2018  路  1Comment  路  Source: kubernetes-sigs/external-dns

I have a cluster with multiple ingress nginx controllers for different apps. I'm targeting the ingress controllers with the standard kubernetes.io/ingress.class: nginx annotations in my ingress definition.
This is on AWS

I have two services

ingress-nginx-default           LoadBalancer   100.68.242.3     a34f9ab615975...   80:31043/TCP,443:32521/TCP   2h
ingress-nginx-web       LoadBalancer   100.70.138.139   a350e73625975...   80:31582/TCP,443:31882/TCP   2h

On my web-ingress definition

  annotations:
    kubernetes.io/ingress.class: nginx-web

and on the web ingress controller deployment

        args:
        - /nginx-ingress-controller
        - --default-backend-service=$(POD_NAMESPACE)/nginx-default-backend
        - --configmap=$(POD_NAMESPACE)/ingress-nginx-web
        - --publish-service=$(POD_NAMESPACE)/ingress-nginx
        - --annotations-prefix=ingress.kubernetes.io
        - --ingress-class=nginx-web

yet no matter what I do, I can't seem to get external dns to point my DNS records to the correct service / ELB, it seems to only ever create record for the default ingress controller. It seems to ignore that ingress class definition completely and always assigns the DNS records to the other ELB.. What am I missing here?

Most helpful comment

I just noticed after posting this that the "--publsh-service" param was pointing to the other ingress controller. 3 hours of my life gone looking for that.

the fix
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-web

Closing out now

>All comments

I just noticed after posting this that the "--publsh-service" param was pointing to the other ingress controller. 3 hours of my life gone looking for that.

the fix
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-web

Closing out now

Was this page helpful?
0 / 5 - 0 ratings