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

     1  Configure DNS record TTL (Time-To-Live)
     2  =======================================
     3  
     4  An optional annotation `external-dns.alpha.kubernetes.io/ttl` is available to customize the TTL value of a DNS record.
     5  TTL is specified as an integer encoded as string representing seconds.
     6  
     7  To configure it, simply annotate a service/ingress, e.g.:
     8  
     9  ```yaml
    10  apiVersion: v1
    11  kind: Service
    12  metadata:
    13    annotations:
    14      external-dns.alpha.kubernetes.io/hostname: nginx.external-dns-test.my-org.com.
    15      external-dns.alpha.kubernetes.io/ttl: "60"
    16    ...
    17  ```
    18  
    19  TTL can also be specified as a duration value parsable by Golang [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration):
    20  
    21  ```yaml
    22  apiVersion: v1
    23  kind: Service
    24  metadata:
    25    annotations:
    26      external-dns.alpha.kubernetes.io/hostname: nginx.external-dns-test.my-org.com.
    27      external-dns.alpha.kubernetes.io/ttl: "1m"
    28    ...
    29  ```
    30  
    31  Both examples result in the same value of 60 seconds TTL.
    32  
    33  TTL must be a positive value.
    34  
    35  Providers
    36  =========
    37  
    38  - [x] AWS (Route53)
    39  - [x] Azure
    40  - [x] Cloudflare
    41  - [x] DigitalOcean
    42  - [x] DNSimple
    43  - [x] Google
    44  - [ ] InMemory
    45  - [x] Linode
    46  - [x] TransIP
    47  - [x] RFC2136
    48  - [x] Vultr
    49  - [x] UltraDNS
    50  
    51  PRs welcome!
    52  
    53  Notes
    54  =====
    55  When the `external-dns.alpha.kubernetes.io/ttl` annotation is not provided, the TTL will default to 0 seconds and `endpoint.TTL.isConfigured()` will be false.
    56  
    57  ### AWS Provider
    58  The AWS Provider overrides the value to 300s when the TTL is 0.
    59  This value is a constant in the provider code.
    60  
    61  ## Azure
    62  TTL value should be between 1 and 2,147,483,647 seconds.
    63  By default it will be 300s.
    64  
    65  ## CloudFlare Provider
    66  CloudFlare overrides the value to "auto" when the TTL is 0.
    67  
    68  ### DigitalOcean Provider
    69  The DigitalOcean Provider overrides the value to 300s when the TTL is 0.
    70  This value is a constant in the provider code.
    71  
    72  ### DNSimple Provider
    73  The DNSimple Provider default TTL is used when the TTL is 0. The default TTL is 3600s.
    74  
    75  ### Google Provider
    76  Previously with the Google Provider, TTL's were hard-coded to 300s.
    77  For safety, the Google Provider overrides the value to 300s when the TTL is 0.
    78  This value is a constant in the provider code.
    79  
    80  For the moment, it is impossible to use a TTL value of 0 with the AWS, DigitalOcean, or Google Providers.
    81  This behavior may change in the future.
    82  
    83  ### Linode Provider
    84  The Linode Provider default TTL is used when the TTL is 0. The default is 24 hours
    85  
    86  ### TransIP Provider
    87  The TransIP Provider minimal TTL is used when the TTL is 0. The minimal TTL is 60s.
    88  
    89  ### Vultr Provider
    90  The Vultr provider minimal TTL is used when the TTL is 0. The default is 1 hour.
    91  
    92  ### UltraDNS
    93  The UltraDNS provider minimal TTL is used when the TTL is not provided. The default TTL is account level default TTL, if defined, otherwise 24 hours.