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

How to create SRV record instead of the default TXT record using external-dns #1814

Closed
manan00 opened this issue Oct 13, 2020 · 9 comments
Closed
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@manan00
Copy link

manan00 commented Oct 13, 2020

We have an application that does SRV lookup to connect to the ILB of the container.
I have added the following annotations to create a DNS record in my service.yaml file

annotations:
external-dns.alpha.kubernetes.io/hostname
external-dns.alpha.kubernetes.io/ttl

This creates TXT and A record. Is there any way to get SRV record created instead of TXT record?
I can see external-dns do support SRV record as per below:
https://github.com/kubernetes-sigs/external-dns/blob/master/provider/recordfilter.go

Please advise.

@manan00 manan00 added the kind/support Categorizes issue or PR as a support question. label Oct 13, 2020
@wolmi
Copy link

wolmi commented Oct 20, 2020

In my case, I'm managing a set of devices that needs to be discovered by Prometheus using SRV.
I'm using CRD to create some A records for each organization that includes a group of devices, and now I need a way to create an SRV record that points to the new records created. Next is my CRDs:

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
 name: a-record
 namespace: external-dns
spec:
 endpoints:
 - dnsName: a.domain.internal
   recordType: A
   targets:
     - 192.168.22.1
     - 192.168.22.2
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
 name: b-record
 namespace: external-dns
spec:
 endpoints:
 - dnsName: b.domain.internal
   recordType: A
   targets:
     - 192.168.23.1
     - 192.168.23.2
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
 name: srv-record
 namespace: external-dns
spec:
 endpoints:
 - dnsName: _srv._tcp.domain.internal
   recordType: SRV
   targets:
     - "0 0 8999 a.domain.internal"
     - "0 0 8999 b.domain.internal"

The A records are created properly but the SRV is not created and no logs or any message appears indicating why is not creating the record.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 18, 2021
@chris-schra
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 21, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 21, 2021
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@aschaber1
Copy link

/reopen

@k8s-ci-robot
Copy link
Contributor

@aschaber1: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants