mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
update pdns tutorial documentation
This commit is contained in:
parent
f653ea1edd
commit
f4eeeae7f7
@ -172,3 +172,102 @@ Once the API shows the record correctly, you can double check your record using:
|
||||
```bash
|
||||
$ dig @${PDNS_FQDN} echo.example.com.
|
||||
```
|
||||
|
||||
## Using CRD source to manage DNS records in PowerDNS
|
||||
|
||||
[CRD source](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/contributing/crd-source.md) provides a generic mechanism and declarative way to manage DNS records in PowerDNS using external-dns.
|
||||
|
||||
```bash
|
||||
external-dns --source=crd --provider=pdns \
|
||||
--pdns-server={{ pdns-api-url }} \
|
||||
--pdns-api-key={{ pdns-api-key }} \
|
||||
--domain-filter=example.com \
|
||||
--managed-record-types=A \
|
||||
--managed-record-types=CNAME \
|
||||
--managed-record-types=TXT \
|
||||
--managed-record-types=MX \
|
||||
--managed-record-types=SRV
|
||||
```
|
||||
|
||||
Not all the record types are enabled by default so we can enable the required record types using `--managed-record-types`.
|
||||
|
||||
* Example for record type `A`
|
||||
|
||||
```yaml
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: examplearecord
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: example.com
|
||||
recordTTL: 60
|
||||
recordType: A
|
||||
targets:
|
||||
- 10.0.0.1
|
||||
```
|
||||
|
||||
* Example for record type `CNAME`
|
||||
|
||||
```yaml
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: examplecnamerecord
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: test-a.example.com
|
||||
recordTTL: 300
|
||||
recordType: CNAME
|
||||
targets:
|
||||
- example.com
|
||||
```
|
||||
|
||||
* Example for record type `TXT`
|
||||
|
||||
```yaml
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: exampletxtrecord
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: example.com
|
||||
recordTTL: 3600
|
||||
recordType: TXT
|
||||
targets:
|
||||
- '"v=spf1 include:spf.protection.example.com include:example.org -all"'
|
||||
- '"apple-domain-verification=XXXXXXXXXXXXX"'
|
||||
```
|
||||
|
||||
* Example for record type `MX`
|
||||
|
||||
```yaml
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: examplemxrecord
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: example.com
|
||||
recordTTL: 3600
|
||||
recordType: MX
|
||||
targets:
|
||||
- "10 mailhost1.example.com"
|
||||
```
|
||||
|
||||
* Example for record type `SRV`
|
||||
|
||||
```yaml
|
||||
apiVersion: externaldns.k8s.io/v1alpha1
|
||||
kind: DNSEndpoint
|
||||
metadata:
|
||||
name: examplesrvrecord
|
||||
spec:
|
||||
endpoints:
|
||||
- dnsName: _service._tls.example.com
|
||||
recordTTL: 180
|
||||
recordType: SRV
|
||||
targets:
|
||||
- "100 1 443 service.example.com"
|
||||
```
|
Loading…
Reference in New Issue
Block a user