|
3 | 3 |
|
4 | 4 | ## Prerequisites |
5 | 5 | ### 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. |
7 | 7 |
|
8 | 8 | ## Installation |
9 | 9 | 1. Download sample `external-dns` manifest |
10 | 10 |
|
11 | 11 | ```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 |
13 | 13 | ``` |
14 | 14 |
|
15 | 15 | 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( |
47 | 47 | ``` |
48 | 48 |
|
49 | 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: |
| 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: |
51 | 51 |
|
52 | 52 | ```yaml |
53 | 53 | annotations: |
54 | 54 | kubernetes.io/ingress.class: alb |
55 | 55 | alb.ingress.kubernetes.io/scheme: internet-facing |
56 | 56 |
|
57 | | - # for creating record-set |
| 57 | + # external-dns specific configuration for creating route53 record-set |
58 | 58 | external-dns.alpha.kubernetes.io/hostname: my-app.test-dns.com # give your domain name here |
59 | 59 | ``` |
60 | 60 |
|
61 | | -2. Similar entries should appear in the ExternalDNS pod log: |
| 61 | +2. A snippet of the external-dns pod log indicating route53 update: |
62 | 62 |
|
63 | 63 | ``` |
64 | 64 | time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com A" |
65 | 65 | time="2019-12-11T10:26:08Z" level=info msg="Desired change: CREATE my-app.test-dns.com TXT" |
66 | 66 | time="2019-12-11T10:26:08Z" level=info msg="2 record(s) in zone my-app.test-dns.com. were successfully updated" |
67 | 67 | ``` |
| 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)]. |
0 commit comments