Skip to content

Commit b5e9427

Browse files
authored
update external dns manifest and docs (#2895)
1 parent 7367f60 commit b5e9427

File tree

4 files changed

+43
-22
lines changed

4 files changed

+43
-22
lines changed

docs/examples/echo_server.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ In this walkthrough, you'll
218218

219219
## Setup external-DNS to manage DNS automatically
220220

221-
1. Ensure your nodes (on which External DNS runs) have the correct IAM permission required for external-dns. See https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/aws.md#iam-permissions.
221+
1. Ensure your nodes (on which External DNS runs) have the correct IAM permission required for external-dns. See https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#iam-permissions.
222222

223-
1. Download external-dns to manage Route 53.
223+
1. Download the sample external-dns manifest
224224

225225
```bash
226-
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.5/docs/examples/external-dns.yaml
226+
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/examples/external-dns.yaml
227227
```
228228

229229
1. Edit the `--domain-filter` flag to include your hosted zone(s)
@@ -245,6 +245,17 @@ In this walkthrough, you'll
245245
kubectl apply -f external-dns.yaml
246246
```
247247

248+
1. Annotate the ingress with the external-dns specific configuration
249+
250+
```yaml
251+
annotations:
252+
kubernetes.io/ingress.class: alb
253+
alb.ingress.kubernetes.io/scheme: internet-facing
254+
255+
# external-dns specific configuration for creating route53 record-set
256+
external-dns.alpha.kubernetes.io/hostname: my-app.test-dns.com # give your domain name here
257+
```
258+
248259
1. Verify the DNS has propagated
249260

250261
```bash

docs/examples/external-dns.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,29 @@ apiVersion: v1
22
kind: ServiceAccount
33
metadata:
44
name: external-dns
5+
labels:
6+
app.kubernetes.io/name: external-dns
57
---
68
apiVersion: rbac.authorization.k8s.io/v1
79
kind: ClusterRole
810
metadata:
911
name: external-dns
12+
labels:
13+
app.kubernetes.io/name: external-dns
1014
rules:
1115
- apiGroups: [""]
12-
resources: ["services"]
16+
resources: ["services", "endpoints", "pods", "nodes"]
1317
verbs: ["get","watch","list"]
14-
- apiGroups: [""]
15-
resources: ["pods"]
16-
verbs: ["get","watch","list"]
17-
- apiGroups: ["extensions"]
18+
- apiGroups: ["extensions", "networking.k8s.io"]
1819
resources: ["ingresses"]
1920
verbs: ["get","watch","list"]
20-
- apiGroups: [""]
21-
resources: ["nodes"]
22-
verbs: ["list"]
23-
- apiGroups: [""]
24-
resources: ["endpoints"]
25-
verbs: ["get","watch","list"]
2621
---
2722
apiVersion: rbac.authorization.k8s.io/v1
2823
kind: ClusterRoleBinding
2924
metadata:
3025
name: external-dns-viewer
26+
labels:
27+
app.kubernetes.io/name: external-dns
3128
roleRef:
3229
apiGroup: rbac.authorization.k8s.io
3330
kind: ClusterRole
@@ -41,23 +38,25 @@ apiVersion: apps/v1
4138
kind: Deployment
4239
metadata:
4340
name: external-dns
41+
labels:
42+
app.kubernetes.io/name: external-dns
4443
spec:
4544
selector:
4645
matchLabels:
47-
app: external-dns
46+
app.kubernetes.io/name: external-dns
4847
strategy:
4948
type: Recreate
5049
template:
5150
metadata:
5251
labels:
53-
app: external-dns
52+
app.kubernetes.io/name: external-dns
5453
spec:
5554
serviceAccountName: external-dns
5655
securityContext:
5756
fsGroup: 65534
5857
containers:
5958
- name: external-dns
60-
image: bitnami/external-dns:0.7.4
59+
image: bitnami/external-dns:0.13.1
6160
# must specify env AWS_REGION in AWS china regions
6261
# env:
6362
# - name: AWS_REGION

docs/guide/integrations/external_dns.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
## Prerequisites
55
### Role Permissions
6-
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.
6+
Adequate roles and policies must be configured in AWS and available to the node(s) running the external-dns. See https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#iam-permissions.
77

88
## Installation
99
1. Download sample `external-dns` manifest
1010

1111
```bash
12-
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.5/docs/examples/external-dns.yaml
12+
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/examples/external-dns.yaml
1313
```
1414

1515
2. Edit the `--domain-filter` flag to include your hosted zone(s)
@@ -47,21 +47,31 @@ Adequate roles and policies must be configured in AWS and available to the node(
4747
```
4848

4949
## 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:
50+
1. To create a record set in the subdomain, from your ingress which has been created by the ingress-controller, add the following annotation in the ingress objectresource:
5151

5252
```yaml
5353
annotations:
5454
kubernetes.io/ingress.class: alb
5555
alb.ingress.kubernetes.io/scheme: internet-facing
5656
57-
# for creating record-set
57+
# external-dns specific configuration for creating route53 record-set
5858
external-dns.alpha.kubernetes.io/hostname: my-app.test-dns.com # give your domain name here
5959
```
6060

61-
2. Similar entries should appear in the ExternalDNS pod log:
61+
2. A snippet of the external-dns pod log indicating route53 update:
6262

6363
```
6464
time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com A"
6565
time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com TXT"
6666
time="2019-12-11T10:26:08Z" level=info msg="2 record(s) in zone my-app.test-dns.com. were successfully updated"
6767
```
68+
69+
3. External DNS configures `Simple` routing policy for the route53 records. You can configure `Weighted` policy by specifying the weight and the identifier via annotation. `Weighted` policy allows you to split the traffic between multiple load balancers. Here is an example to specify weight and identifier:
70+
```yaml
71+
annotations:
72+
# For creating weighted route53 records
73+
external-dns.alpha.kubernetes.io/hostname: my-app.test-dns.com
74+
external-dns.alpha.kubernetes.io/aws-weight: "100"
75+
external-dns.alpha.kubernetes.io/set-identifier: "3"
76+
```
77+
You can refer to the External DNS documentation for further details [[link](https://kubernetes-sigs.github.io/external-dns/latest/tutorials/aws/#routing-policies)].

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nav:
3636
- Examples:
3737
- EchoServer: examples/echo_server.md
3838
- gRPCServer: examples/grpc_server.md
39+
- Setup External DNS: guide/integrations/external_dns.md
3940
- RBAC to access OIDC Secret: examples/secrets_access.md
4041

4142

0 commit comments

Comments
 (0)