Skip to content

Commit 27884d4

Browse files
committed
docs: update example for ExternalDNS
* fix `kubectl logs` exmaple command since `external-dns` being deployed in `default` namespace with provided sample manifest * update the container args example * update the logs output example and add the recordset creation log
1 parent b42cd80 commit 27884d4

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

docs/guide/external-dns/setup.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
Adequate roles and policies must be configured in AWS and available to the node(s) running the external-dns. See https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/aws.md#iam-permissions.
77

88
## Installation
9-
1. Download sample external-dns manifest
10-
11-
``` bash
9+
1. Download sample `external-dns` manifest
10+
11+
```bash
1212
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-alb-ingress-controller/v1.1.4/docs/examples/external-dns.yaml
1313
```
1414

1515
2. Edit the `--domain-filter` flag to include your hosted zone(s)
1616

17-
The following example is for a hosted zone test-dns.com
17+
The following example is for a hosted zone `test-dns.com`:
1818

1919
```yaml
2020
args:
@@ -23,32 +23,45 @@ Adequate roles and policies must be configured in AWS and available to the node(
2323
- --domain-filter=test-dns.com # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
2424
- --provider=aws
2525
- --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
26+
- --aws-zone-type=public # only look at public hosted zones (valid values are public, private or no value for both)
27+
- --registry=txt
28+
- --txt-owner-id=my-identifier
2629
```
2730

2831
3. Deploy external-dns
2932

30-
``` bash
33+
```bash
3134
kubectl apply -f external-dns.yaml
3235
```
3336

3437
4. Verify it deployed successfully.
3538

36-
``` bash
37-
kubectl logs -f -n kube-system $(kubectl get po -n kube-system | egrep -o 'external-dns[A-Za-z0-9-]+')
39+
```bash
40+
kubectl logs -f $(kubectl get po | egrep -o 'external-dns[A-Za-z0-9-]+')
3841
```
3942

40-
Should display output similar to the following.
43+
Should display output similar to the following:
4144
```
42-
time="2017-09-19T02:51:54Z" level=info msg="config: &{Master: KubeConfig: Sources:[service ingress] Namespace: FQDNTemplate: Compatibility: Provider:aws GoogleProject: DomainFilter:[] AzureConfigFile:/etc/kuberne tes/azure.json AzureResourceGroup: Policy:upsert-only Registry:txt TXTOwnerID:my-identifier TXTPrefix: Interval:1m0s Once:false DryRun:false LogFormat:text MetricsAddress::7979 Debug:false}"
43-
time="2017-09-19T02:51:54Z" level=info msg="Connected to cluster at https://10.3.0.1:443"
45+
time="2019-12-11T10:26:05Z" level=info msg="config: {Master: KubeConfig: RequestTimeout:30s IstioIngressGateway:istio-system/istio-ingressgateway Sources:[service ingress] Namespace: AnnotationFilter: FQDNTemplate: CombineFQDNAndAnnotation:false Compatibility: PublishInternal:false PublishHostIP:false ConnectorSourceServer:localhost:8080 Provider:aws GoogleProject: DomainFilter:[test-dns.com] ZoneIDFilter:[] AlibabaCloudConfigFile:/etc/kubernetes/alibaba-cloud.json AlibabaCloudZoneType: AWSZoneType:public AWSAssumeRole: AWSBatchChangeSize:4000 AWSBatchChangeInterval:1s AWSEvaluateTargetHealth:true AzureConfigFile:/etc/kubernetes/azure.json AzureResourceGroup: CloudflareProxied:false InfobloxGridHost: InfobloxWapiPort:443 InfobloxWapiUsername:admin InfobloxWapiPassword: InfobloxWapiVersion:2.3.1 InfobloxSSLVerify:true DynCustomerName: DynUsername: DynPassword: DynMinTTLSeconds:0 OCIConfigFile:/etc/kubernetes/oci.yaml InMemoryZones:[] PDNSServer:http://localhost:8081 PDNSAPIKey: PDNSTLSEnabled:false TLSCA: TLSClientCert: TLSClientCertKey: Policy:upsert-only Registry:txt TXTOwnerID:my-identifier TXTPrefix: Interval:1m0s Once:false DryRun:false LogFormat:text MetricsAddress::7979 LogLevel:info TXTCacheInterval:0s ExoscaleEndpoint:https://api.exoscale.ch/dns ExoscaleAPIKey: ExoscaleAPISecret: CRDSourceAPIVersion:externaldns.k8s.io/v1alpha CRDSourceKind:DNSEndpoint ServiceTypeFilter:[] RFC2136Host: RFC2136Port:0 RFC2136Zone: RFC2136Insecure:false RFC2136TSIGKeyName: RFC2136TSIGSecret: RFC2136TSIGSecretAlg: RFC2136TAXFR:false}"
46+
time="2019-12-11T10:26:05Z" level=info msg="Created Kubernetes client https://10.100.0.1:443"
4447
```
4548

46-
## Usage:
47-
To create a record set in the subdomain, from your ingress which has been created by the ingress-controller, simply add the following annotation in the ingress object specification,
49+
## Usage
50+
1. To create a record set in the subdomain, from your ingress which has been created by the ingress-controller, simply add the following annotation in the ingress object specification and apply the manifest:
4851

52+
```yaml
4953
annotations:
5054
kubernetes.io/ingress.class: alb
5155
alb.ingress.kubernetes.io/scheme: internet-facing
5256
5357
# for creating record-set
5458
external-dns.alpha.kubernetes.io/hostname: my-app.test-dns.com # give your domain name here
59+
```
60+
61+
2. Similar entries should appear in the ExternalDNS pod log:
62+
63+
```
64+
time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com A"
65+
time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com TXT"
66+
time="2019-12-11T10:26:08Z" level=info msg="2 record(s) in zone my-app.test-dns.com. were successfully updated"
67+
```

0 commit comments

Comments
 (0)