Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/external-dns] - Specify custom IP for DNS records #30613

Open
vikas027 opened this issue Nov 25, 2024 · 3 comments
Open

[bitnami/external-dns] - Specify custom IP for DNS records #30613

vikas027 opened this issue Nov 25, 2024 · 3 comments
Assignees

Comments

@vikas027
Copy link

Name and Version

bitnami/external-dns 8.6.0

What is the problem this feature will solve?

My Environment

Kubernetes: Azure Kubernetes Engine
Ingress Controller: Nginx
Load Balancer: Azure Internal Load Balancer
DNS: Cloudflare

My kubernetes ingress defaults to the private IP of an internal load balancer. My setup looks like this

Azure Application Gateway (Public IP) --> Azure Firewall --> Azure Internal Load Balancer --> K8s Nginx Ingress Controller ---> K8s Nginx Pods

Problem

In my environment, the ingress resource has the IP of the internal load balancer (i.e. 192.168.1.10) and not the public IP of the application gateway (i.e. 52.164.208.127)

❯ k get ing
NAME        CLASS      HOSTS                 ADDRESS        PORTS     AGE
vikas       nginx      vikas.example.com     192.168.1.10   80, 443   9d

What is the feature you are proposing to solve the problem?

It would be great to have a helm variable (say EXTERNAL_IP: 52.164.208.127) that can be read and used by the operator to create DNS records on Cloudflare.

What alternatives have you considered?

I'll have to write a custom operator in Python :)

@vikas027 vikas027 changed the title Specify custom IP for DNS records [external-dns] - Specify custom IP for DNS records Nov 25, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 25, 2024
@javsalgar javsalgar changed the title [external-dns] - Specify custom IP for DNS records [bitnami/external-dns] - Specify custom IP for DNS records Nov 25, 2024
@javsalgar
Copy link
Contributor

Hi,

Thank you so much for the feature request. My question is, does external-dns support this EXTERNAL_IP variable? If not, this is something that first should be reported to the external-dns devs. Did you check with them? https://github.com/kubernetes-sigs/external-dns/

@vikas027
Copy link
Author

Hey @javsalgar ,

Thanks, it looks like there is an option externalIPs . I tried using it but the controller still created the Cloudflare DNS record with an internal IP 192.168.1.10 and not the public IP 52.164.208.127.

My workaround (after a few hours of Google-ing) was to add an annotation to the ingress external-dns.alpha.kubernetes.io/target: "52.164.208.127". Once, I updated the ingress resource with this annotation, the controller created the DNS record with the public IP.

@javsalgar
Copy link
Contributor

Hi, if you set it and the controller did not work as expected, then my advice would be to report it to the external-dns devs so they can check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants