Skip to content

One identical DNS record governed by multiple k8s clusters #5916

@CallMeFoxie

Description

@CallMeFoxie

What would you like to be added: The option to manage one record from two different k8s clusters. Let me explain the use case:

Why is this needed:
We run one service (some sort of API) from two Kubernetes clusters (doesn't matter if it is one or multiple datacentres) and we use BGP Anycast (Cilium for networking, in private datacentre) to run the same API in two separate k8s clusters for "higher than high availability" and failovers. Obviously they have the same IP and the same hostname in our private network.

However we can register the DNS record only from one cluster because of the owner-id feature (as each cluster has a different owner-id).

My only two solutions I can think of are:

  1. create it in both, the first instance will create it including the TXT record; the second instance will already find the A record existing and just do nothing. If the first cluster deletes the record (eg during some migration of the API between clusters) it will re-create the DNS record, however that will create some downtime on the record itself!
  2. patch External-DNS to allow having "multiple" owner-id references in the TXT record (separated by some character), basically "reference counting" - if the TXT already exists, the ExternalDNS makes sure it is in the owners list, if it does not it creates the record and vice-versa for deleting the record.

I quickly chatted on Slack about this issue but people were not too thrilled about the 2nd option :-) so I am in for any other ways to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions