Skip to content

Creating MX record with CRD source

You can create and manage MX records with the help of CRD source
and DNSEndpoint CRD. Currently, this feature is only supported by aws, azure, and google providers.

In order to start managing MX records you need to set the --managed-record-types MX flag.

external-dns --source crd --provider {aws|azure|google} --managed-record-types A --managed-record-types CNAME --managed-record-types MX

Targets within the CRD need to be specified according to the RFC 1034 (section 3.6.1). Below is an example of DNS MX record which specifies two separate targets with distinct priorities.

kind: DNSEndpoint
  name: examplemxrecord
    - dnsName:
      recordTTL: 180
      recordType: MX
        - 10
        - 20

Last update: May 2, 2023
Back to top