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

Specify custom IP for DNS records #4910

Open
vikas027 opened this issue Dec 1, 2024 · 2 comments
Open

Specify custom IP for DNS records #4910

vikas027 opened this issue Dec 1, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@vikas027
Copy link

vikas027 commented Dec 1, 2024

What happened:
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

I tried using externalIPs 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.

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

What you expected to happen:
I expected the operator to create the DNS record with the public IP 52.164.208.127.

How to reproduce it (as minimally and precisely as possible):
Try using externalIPs in the helm values file.

Workaround
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.

Anything else we need to know?:

Environment:

  • External-DNS version (use external-dns --version): 8.6.0
  • DNS provider: Cloudflare
  • Kubernetes: Azure Kubernetes Engine
  • Ingress Controller: Nginx
  • Load Balancer: Azure Internal Load Balancer

Linked Issues

@vikas027 vikas027 added the kind/bug Categorizes issue or PR as related to a bug. label Dec 1, 2024
@NarmalaSk
Copy link

I think its closed

@vikas027
Copy link
Author

I think its closed

Do you mean the linked issue? If yes, it was closed as recommended by the contributor of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants