sigs.k8s.io/external-dns@v0.14.1/docs/annotations/annotations.md (about)

     1  # Annotations
     2  
     3  ExternalDNS sources support a number of annotations on the Kubernetes resources that they examine.
     4  
     5  The following table documents which sources support which annotations:
     6  
     7  | Source       | controller | hostname | internal-hostname | target  | ttl     | (provider-specific) |
     8  |--------------|------------|----------|-------------------|---------|---------|---------------------|
     9  | Ambassador   |            |          |                   | Yes     | Yes     | Yes                 |
    10  | Connector    |            |          |                   |         |         |                     |
    11  | Contour      | Yes        | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    12  | CloudFoundry |            |          |                   |         |         |                     |
    13  | CRD          |            |          |                   |         |         |                     |
    14  | F5           |            |          |                   | Yes     | Yes     |                     |
    15  | Gateway      | Yes        | Yes[^1]  |                   | Yes[^4] | Yes     | Yes                 |
    16  | Gloo         |            |          |                   | Yes     | Yes[^5] | Yes[^5]             |
    17  | Ingress      | Yes        | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    18  | Istio        | Yes        | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    19  | Kong         |            | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    20  | Node         | Yes        |          |                   | Yes     | Yes     |                     |
    21  | OpenShift    | Yes        | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    22  | Pod          |            | Yes      | Yes               | Yes     |         |                     |
    23  | Service      | Yes        | Yes[^1]  | Yes[^1][^2]       | Yes[^3] | Yes     | Yes                 |
    24  | Skipper      | Yes        | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    25  | Traefik      |            | Yes[^1]  |                   | Yes     | Yes     | Yes                 |
    26  
    27  [^1]: Unless the `--ignore-hostname-annotation` flag is specified.
    28  [^2]: Only behaves differently than `hostname` for `Service`s of type `ClusterIP` or `LoadBalancer`.
    29  [^3]: Also supported on `Pods` referenced from a headless `Service`'s `Endpoints`.
    30  [^4]: The annotation must be on the `Gateway`.
    31  [^5]: The annotation must be on the listener's `VirtualService`.
    32  
    33  ## external-dns.alpha.kubernetes.io/access
    34  
    35  Specifies which set of node IP addresses to use for a `Service` of type `NodePort`.
    36  
    37  If the value is `public`, use the Nodes' addresses of type `ExternalIP`, plus IPv6 addresses of type `InternalIP`.
    38  
    39  If the value is `private`, use the Nodes' addresses of type `InternalIP`.
    40  
    41  If the annotation is not present and there is at least one address of type `ExternalIP`,
    42  behave as if the value were `public`, otherwise behave as if the value were `private`.
    43  
    44  ## external-dns.alpha.kubernetes.io/controller
    45  
    46  If this annotation exists and has a value other than `dns-controller` then the source ignores the resource.
    47  
    48  ## external-dns.alpha.kubernetes.io/endpoints-type
    49  
    50  Specifies which set of addresses to use for a headless `Service`.
    51  
    52  If the value is `NodeExternalIP`, use each relevant `Pod`'s `Node`'s address of type `ExternalIP`
    53  plus each IPv6 address of type `InternalIP`.
    54  
    55  Otherwise, if the value is `HostIP` or the `--publish-host-ip` flag is specified, use
    56  each relevant `Pod`'s `Status.HostIP`.
    57  
    58  Otherwise, use the `IP` of each of the `Service`'s `Endpoints`'s `Addresses`.
    59  
    60  ## external-dns.alpha.kubernetes.io/hostname
    61  
    62  Specifies the domain for the resource's DNS records.
    63  
    64  ## external-dns.alpha.kubernetes.io/ingress-hostname-source
    65  
    66  Specifies where to get the domain for an `Ingress` resource.
    67  
    68  If the value is `defined-hosts-only`, use only the domains from the `Ingress` spec.
    69  
    70  If the value is `annotation-only`, use only the domains from the `Ingress` annotations.
    71  
    72  If the annotation is not present, use the domains from both the spec and annotations.
    73  
    74  ## external-dns.alpha.kubernetes.io/internal-hostname
    75  
    76  Specifies the domain for the resource's DNS records that are for use from internal networks.
    77  
    78  For `Services` of type `LoadBalancer`, uses the `Service`'s `ClusterIP`.
    79  
    80  For `Pods`, uses the `Pod`'s `Status.PodIP`.
    81  
    82  ## external-dns.alpha.kubernetes.io/target
    83  
    84  Specifies a comma-separated list of values to override the resource's DNS record targets (RDATA).
    85  
    86  Targets that parse as IPv4 addresses are published as A records and
    87  targets that parse as IPv6 addresses are published as AAAA records. All other targets
    88  are published as CNAME records.
    89  
    90  ## external-dns.alpha.kubernetes.io/ttl
    91  
    92  Specifies the TTL (time to live) for the resource's DNS records.
    93  
    94  The value may be specified as either a duration or an integer number of seconds.
    95  It must be between 1 and 2,147,483,647 seconds.
    96  
    97  ## Provider-specific annotations
    98  
    99  Some providers define their own annotations. Cloud-specific annotations have keys prefixed as follows:
   100  
   101  | Cloud      | Annotation prefix                              |
   102  |------------|------------------------------------------------|
   103  | AWS        | `external-dns.alpha.kubernetes.io/aws-`        |
   104  | CloudFlare | `external-dns.alpha.kubernetes.io/cloudflare-` |
   105  | IBM Cloud  | `external-dns.alpha.kubernetes.io/ibmcloud-`   |
   106  | Scaleway   | `external-dns.alpha.kubernetes.io/scw-`        |
   107  
   108  Additional annotations that are currently implemented only by AWS are:
   109  
   110  ### external-dns.alpha.kubernetes.io/alias
   111  
   112  If the value of this annotation is `true`, specifies that CNAME records generated by the
   113  resource should instead be alias records.
   114  
   115  This annotation is only relevant if the `--aws-prefer-cname` flag is specified.
   116  
   117  ### external-dns.alpha.kubernetes.io/set-identifier
   118  
   119  Specifies the set identifier for DNS records generated by the resource.
   120  
   121  A set identifier differentiates among multiple DNS record sets that have the same combination of domain and type.
   122  Which record set or sets are returned to queries is then determined by the configured routing policy.