Verify your External DNS Configuration
This page contains commands to verify that the external-dns service is functioning correctly. 
If the external-dns service is not working properly, these commands also provide aids to find the cause or identify the issue.
Verify the Deployment
Verify that the deployment was triggered.
- Set the environment variable to the Management/Essential cluster by exporting the - kubeconfigfile in your terminal window or using the- --kubeconfig=${CLUSTER_NAME}.confas explained in Provide Context for Commands with a kubeconfig File.
- Verify that the - external-dnsdeployment is present: Replace Replace- <target_WORKSPACE_NAMESPACE>in the namespace- -nflag with the target cluster’s workspace namespace.CODE- kubectl get appdeployments.apps.kommander.d2iq.io -n <target_WORKSPACE_NAMESPACE> external-dns- The output should look like this: CODE- NAME APP AGE external-dns external-dns-<app_version> 36s- The CLI has triggered the deployment of the application. However, this does not mean that the application has been installed completely and successfully. 
Verify that the deployment was successful.
- Set the environment variable to the target cluster (where you enabled - external-dns) by exporting the- kubeconfigfile in your terminal window or using the- --kubeconfig=${CLUSTER_NAME}.confas explained in Provide Context for Commands with a kubeconfig File.
- Verify that the - external-dnsdeployment is ready: Replace Replace- <target_WORKSPACE_NAMESPACE>in the namespace- -nflag with the target cluster’s workspace namespace.CODE- kubectl get deployments.apps -n <target_WORKSPACE_NAMESPACE> external-dns- The deployment should display a ready state: CODE- NAME READY UP-TO-DATE AVAILABLE AGE external-dns 1/1 1 1 42s- The CLI has deployed the application completely and successfully. 
Examine the Cluster’s Ingress
- Set the environment variable to the target cluster (where you enabled - external-dns) by exporting the- kubeconfigfile in your terminal window or using the- --kubeconfig=${CLUSTER_NAME}.confas explained in Provide Context for Commands with a kubeconfig File.
- Verify that the cluster’s ingress contains the correct hostname annotation:  Replace Replace- <target_WORKSPACE_NAMESPACE>in the namespace- -nflag with the target cluster’s workspace namespace.CODE- kubectl get services -n <target_WORKSPACE_NAMESPACE> kommander-traefik -o yaml- The output looks like this:  Ensure that the service object contains the Ensure that the service object contains the- external-dns.alpha.kubernetes.io/hostname: <mycluster.example.com>annotation.CODE- apiVersion: v1 kind: Service metadata: annotations: meta.helm.sh/release-name: kommander-traefik meta.helm.sh/release-namespace: kommander external-dns.alpha.kubernetes.io/hostname: <mycluster.example.com> creationTimestamp: "2023-06-21T04:52:49Z" finalizers: [...]- The - external-dnsservice has been linked to the cluster correctly.
Verify the DNS Record
It can take a few minutes for the external-dns service to create a DNS record. The delay depends on your cloud provider.
Verify that the external-dns service has created a DNS record.
- Set the environment variable to the target cluster (where you enabled - external-dns) by exporting the- kubeconfigfile in your terminal window or using the- --kubeconfig=${CLUSTER_NAME}.confas explained in Provide Context for Commands with a kubeconfig File.
- Access and execute the required image: CODE- kubectl run -it --image=nicolaka/netshoot --rm test-dns -- /bin/bash
- Use the image to check your domain and see the record:  Replace Replace- <mycluster.example.com>with the domain you assigned to your target cluster.CODE- nslookup <mycluster.example.com>- The output should look like this: CODE- Server: 192.168.178.1 Address: 192.168.178.1#53 Non-authoritative answer: Name: <mycluster.example.com> Address: 134.568.789.12- The - external-dnsservice is working and the DNS provider recognizes the record created by the service. If the command displays an error, the configuration is failing on the end of the DNS provider.
