sigs.k8s.io/external-dns@v0.14.1/docs/tutorials/mx-record.md (about)

     1  # Creating MX record with CRD source
     2  
     3  You can create and manage MX records with the help of [CRD source](/docs/contributing/crd-source.md)
     4  and `DNSEndpoint` CRD. Currently, this feature is only supported by `aws`, `azure`, and `google` providers.
     5  
     6  In order to start managing MX records you need to set the `--managed-record-types MX` flag.
     7  
     8  ```console
     9  external-dns --source crd --provider {aws|azure|google} --managed-record-types A --managed-record-types CNAME --managed-record-types MX
    10  ```
    11  
    12  Targets within the CRD need to be specified according to the RFC 1034 (section 3.6.1). Below is an example of
    13  `example.com` DNS MX record which specifies two separate targets with distinct priorities.
    14  
    15  ```yaml
    16  apiVersion: externaldns.k8s.io/v1alpha1
    17  kind: DNSEndpoint
    18  metadata:
    19    name: examplemxrecord
    20  spec:
    21    endpoints:
    22      - dnsName: example.com
    23        recordTTL: 180
    24        recordType: MX
    25        targets:
    26          - 10 mailhost1.example.com
    27          - 20 mailhost2.example.com
    28  ```