mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Merge pull request #1581 from stefanlasiewski/patch-1
Improve documentation about rfc2136 TTLs
This commit is contained in:
commit
1e2b11d3d3
@ -108,9 +108,29 @@ spec:
|
||||
serviceName: my-service
|
||||
servicePort: 8000
|
||||
```
|
||||
There are other annotation that can affect the generation of DNS records like
|
||||
external-dns.alpha.kubernetes.io/ttl. These are beyond the scope of this
|
||||
tutorial and are covered elsewhere in the docs.
|
||||
|
||||
### Custom TTL
|
||||
|
||||
The default DNS record TTL (Time-To-Live) is 0 seconds. You can customize this value by setting the annotation `external-dns.alpha.kubernetes.io/ttl`. e.g., modify the service manifest YAML file above:
|
||||
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: nginx.external-dns-test.my-org.com
|
||||
external-dns.alpha.kubernetes.io/ttl: 60
|
||||
spec:
|
||||
...
|
||||
```
|
||||
|
||||
This will set the DNS record's TTL to 60 seconds.
|
||||
|
||||
A default TTL for all records can be set using the the flag with a time in seconds, minutes or hours, such as `--rfc2136-min-ttl=60s`
|
||||
|
||||
There are other annotation that can affect the generation of DNS records, but these are beyond the scope of this
|
||||
tutorial and are covered in the main documentation.
|
||||
|
||||
### Test with external-dns installed on local machine (optional)
|
||||
You may install external-dns and test on a local machine by running:
|
||||
|
Loading…
Reference in New Issue
Block a user