Verify ExternalDNS with Designate back end after deployment

Verify ExternalDNS with Designate back end after deploymentΒΆ

After you complete the steps described in Deploy ExternalDNS, verify that ExternalDNS is successfully deployed with Designate back end using the procedure below.

To verify ExternalDNS with Designate back end:

  1. Log in to any Kubernetes Master node.

  2. Source the openrc file of your OpenStack environment:

    source keystonerc
    

    Note

    If you use Keystone v3, use the source keystonercv3 command instead.

  3. Open the Designate shell using the designate command.

  4. 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. |
    +-------------+---------------------------------------+
    
  5. 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.|
    +----+------+---------------------------------------+------------------------+
    
  6. Start my-nginx:

    kubectl run my-nginx --image=nginx --port=80
    

    Example of system response:

    deployment "my-nginx" created
    
  7. Expose my-nginx:

    kubectl expose deployment my-nginx --port=80 --type=ClusterIP
    

    Example of system response:

    service "my-nginx" exposed
    
  8. 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
    
  9. 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"|
    +-----+------+--------------------------------------+---------------------------------------------------------+