Follow these instructions to install ExternalDNS on a TKG Service cluster that is running TKr for vSphere 8.x.

About ExternalDNS

ExternalDNS allows for DNS records to be created automatically for Kubernetes services with an ingress component such as Contour with Envoy. The ExternalDNS package is validated with the following DNS providers: AWS Route 53, Azure DNS, and RFC2136-compliant DNS servers (such as BIND). See also ExternalDNS Package Reference.

Prerequisites

Create ExternalDNS Data Values

Prepare to install ExternalDNS by creating the ExternalDNS data values file.
  1. List the ExternalDNS package versions available in the repository.
    tanzu package available get external-dns.tanzu.vmware.com -n tkg-system
    Or, using kubectl.
    kubectl -n tkg-system get packages | grep external-dns
    Note: Typically you should use the latest version unless your requirements differ.
  2. Generate the data values file for the ExternalDNS package.
    tanzu package available get external-dns.tanzu.vmware.com/0.13.6+vmware.1-tkg.1 --default-values-file-output external-dns-data-values.yaml
    Where:
    • 0.13.6+vmware.1-tkg.1 is the target package version
    • external-dns-data-values.yaml is the name and path of the data values file to generate
  3. Customize the data values for your environment.

    Data values differ depending on which supported DNS server you are targeting. See ExternalDNS Package Reference for examples.

  4. If necessary, create a configmap that defines the DNS server the ExternalDNS package will interface with.

    See ExternalDNS Package Reference for an example.

Install ExternalDNS

Complete these steps to install the ExternalDNS package on a TKG cluster.
  1. Create a namespace for ExternalDNS.
    kubectl create ns tanzu-system-service-discovery
  2. Install the ExternalDNS package using the Tanzu CLI.
    tanzu package install external-dns -p external-dns.tanzu.vmware.com -n tanzu-system-service-discovery -v 0.11.0+vmware.1-tkg.2 --values-file external-dns-data-values.yaml
  3. Verify that the package is installed using the Tanzu CLI.
    tanzu package installed list -n tanzu-system-service-discovery
    
    NAME          PACKAGE-NAME                   PACKAGE-VERSION        STATUS
    external-dns  external-dns.tanzu.vmware.com  0.11.0+vmware.1-tkg.2  Reconcile succeeded
    kubectl -n tanzu-system-service-discovery get all
    NAME                               READY   STATUS    RESTARTS   AGE
    pod/external-dns-77d947745-tcjz9   1/1     Running   0          63s
     
    NAME                           READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/external-dns   1/1     1            1           63s
     
    NAME                                     DESIRED   CURRENT   READY   AGE
    replicaset.apps/external-dns-77d947745   1         1         1       63s

Reference