After you complete the steps described in Deploy ExternalDNS, verify that ExternalDNS is successfully deployed with Designate backend using the procedure below.
To verify ExternalDNS with Designate backend:
Log in to any Kubernetes Master node.
Source the openrc
file of your OpenStack environment:
source keystonerc
Note
If you use Keystone v3, use the source keystonercv3 command instead.
Open the Designate shell using the designate command.
Create a domain:
domain-create --name nginx.<your_mcp_domain>.local. --email <your_email>
Example of system response:
+-------------+---------------------------------------+
| Field | Value |
+-------------+---------------------------------------+
| description | None |
| created_at | 2017-10-13T16:23:26.533547 |
| updated_at | None |
| email | designate@example.org |
| ttl | 3600 |
| serial | 1423844606 |
| id | ae59d62b-d655-49a0-ab4b-ea536d845a32 |
| name | nginx.virtual-mcp11-k8s-calico.local. |
+-------------+---------------------------------------+
Verify that the domain was successfully created. Use the id
parameter
value from the output of the command described in the previous step.
Keep this value for further verification steps.
For example:
record-list ae59d62b-d655-49a0-ab4b-ea536d845a32
Example of system response:
+----+------+---------------------------------------+------------------------+
|id | type | name | data |
+----+------+---------------------------------------+------------------------+
|... | NS | nginx.virtual-mcp11-k8s-calico.local. | dns01.bud.mirantis.net.|
+----+------+---------------------------------------+------------------------+
Start my-nginx
:
kubectl run my-nginx --image=nginx --port=80
Example of system response:
deployment "my-nginx" created
Expose my-nginx
:
kubectl expose deployment my-nginx --port=80 --type=ClusterIP
Example of system response:
service "my-nginx" exposed
Annotate my-nginx
:
kubectl annotate service my-nginx \
"external-dns.alpha.kubernetes.io/hostname=nginx.<your_domain>.local."
Example of system response:
service "my-nginx" annotated
Verify that the domain was associated with the IP inside a Designate record
by running the record-list [id] command.
Use the id
parameter value from the output of the command described
in step 4. For example:
record-list ae59d62b-d655-49a0-ab4b-ea536d845a32
Example of system response:
+-----+------+--------------------------------------+---------------------------------------------------------+
| id | type | name | data |
+-----+------+--------------------------------------+---------------------------------------------------------+
| ... | NS | nginx.virtual-mcp11-k8s-calico.local.| dns01.bud.mirantis.net. |
+-----+------+--------------------------------------+---------------------------------------------------------+
| ... | A | nginx.virtual-mcp11-k8s-calico.local.| 10.254.70.16 |
+-----+------+--------------------------------------+---------------------------------------------------------+
| ... | TXT | nginx.virtual-mcp11-k8s-calico.local.| "heritage=external-dns,external-dns/owner=my-identifier"|
+-----+------+--------------------------------------+---------------------------------------------------------+