[Feature] Round robin for extra_dns #983

Closed
opened 2025-12-29 02:27:02 +01:00 by adam · 7 comments
Owner

Originally created by @gawsoftpl on GitHub (Mar 22, 2025).

Use case

I have 3 endpoints for master internal kubenetes control plane, and now I can only setup one ip for extra_dns per endpoint.

Description

round_robin_dns – This allows DNS queries to be distributed across multiple IP addresses (e.g., 100.64.0.3 and 100.64.0.4), providing load balancing (Round Robin DNS).

0.3 and 100.64.0.4), providing load balancing (Round Robin DNS).

extra_records – This section allows you to add custom DNS records. In this case, an A record is added for grafana.myvpn.example.com, which points to two different IP addresses (100.64.0.3 and 100.64.0.4), which will operate in round robin mode.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

extra_records:
  - name: "grafana.myvpn.example.com"
    type: "A"
    value: ["100.64.0.3", "100.64.0.4"] 
Originally created by @gawsoftpl on GitHub (Mar 22, 2025). ### Use case I have 3 endpoints for master internal kubenetes control plane, and now I can only setup one ip for extra_dns per endpoint. ### Description round_robin_dns – This allows DNS queries to be distributed across multiple IP addresses (e.g., 100.64.0.3 and 100.64.0.4), providing load balancing (Round Robin DNS). 0.3 and 100.64.0.4), providing load balancing (Round Robin DNS). extra_records – This section allows you to add custom DNS records. In this case, an A record is added for grafana.myvpn.example.com, which points to two different IP addresses (100.64.0.3 and 100.64.0.4), which will operate in round robin mode. ### Contribution - [x] I can write the design doc for this feature - [ ] I can contribute this feature ### How can it be implemented? ```yaml extra_records: - name: "grafana.myvpn.example.com" type: "A" value: ["100.64.0.3", "100.64.0.4"] ```
adam added the enhancementstale labels 2025-12-29 02:27:02 +01:00
adam closed this issue 2025-12-29 02:27:02 +01:00
Author
Owner

@kradalby commented on GitHub (Mar 23, 2025):

This is unsupported in the client, so we can't add that sadly; https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L1713

Extra records are passed directly as is so what you see in the config is what you get.

@kradalby commented on GitHub (Mar 23, 2025): This is unsupported in the client, so we can't add that sadly; https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L1713 Extra records are passed directly as is so what you see in the config is what you get.
Author
Owner

@ky-bd commented on GitHub (Mar 23, 2025):

I used to have the same question, and, sadly, found the same answer as kradalby mentioned. I end up adding those records to a public DNS provider (i.e. Cloudflare) which supports round robin , and is considered harmless, according to the tailscale docs.

@ky-bd commented on GitHub (Mar 23, 2025): I used to have the same question, and, sadly, found the same answer as kradalby mentioned. I end up adding those records to a public DNS provider (i.e. Cloudflare) which [supports round robin](https://developers.cloudflare.com/dns/manage-dns-records/how-to/round-robin-dns/) , and is considered *harmless*, according to the [tailscale docs](https://tailscale.com/kb/1054/dns#public-dns-records).
Author
Owner

@gawsoftpl commented on GitHub (Mar 23, 2025):

This is unsupported in the client, so we can't add that sadly; https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L1713

Extra records are passed directly as is so what you see in the config is what you get.

In code are comment

// TODO(bradfitz): if we ever add support for record types
// with non-UTF8 binary data, add ValueBytes []byte that

So I have to write to @bradfitz

@gawsoftpl commented on GitHub (Mar 23, 2025): > This is unsupported in the client, so we can't add that sadly; https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L1713 > > Extra records are passed directly as is so what you see in the config is what you get. In code are comment // TODO(bradfitz): if we ever add support for record types // with non-UTF8 binary data, add ValueBytes []byte that So I have to write to @bradfitz
Author
Owner

@kradalby commented on GitHub (Mar 23, 2025):

I don’t think that indicates that they will support multiple, it is talking about other formats.

Please don’t add workload for the tailscale prosject.

@kradalby commented on GitHub (Mar 23, 2025): I don’t think that indicates that they will support multiple, it is talking about other formats. Please don’t add workload for the tailscale prosject.
Author
Owner

@lucat1 commented on GitHub (Apr 12, 2025):

Perhaps I'm missing something obvious, but it seems to me like the tailscale client supports multiple ip addresses for the same FQDN, as shown here. The link is from the headscale documentation, so I assume @kradalby is aware of this and I must be missing something.

What is preventing us from using this configuration in headscale?

[
  {
    "name": "test.example.com",
    "type": "A",
    "value": "100.x.y.1"
  },
  {
    "name": "test.example.com",
    "type": "A",
    "value": "100.x.y.2"
  }
]

I've tried but the client only seems to get the first IP out of the two. Is this a headscale limitation or is this inherent to tailscale?

@lucat1 commented on GitHub (Apr 12, 2025): Perhaps I'm missing something obvious, but it seems to me like the tailscale client supports multiple ip addresses for the same FQDN, as shown [here](https://github.com/tailscale/tailscale/blob/v1.78.3/ipn/ipnlocal/local.go#L4461-L4479). The link is from the headscale documentation, so I assume @kradalby is aware of this and I must be missing something. What is preventing us from using this configuration in headscale? ```json [ { "name": "test.example.com", "type": "A", "value": "100.x.y.1" }, { "name": "test.example.com", "type": "A", "value": "100.x.y.2" } ] ``` I've tried but the client only seems to get the first IP out of the two. Is this a headscale limitation or is this inherent to tailscale?
Author
Owner

@github-actions[bot] commented on GitHub (Jul 12, 2025):

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Jul 12, 2025): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 20, 2025):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Jul 20, 2025): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#983