From 8f6f6731c56780e0a0e907ff02f2c16941df000b Mon Sep 17 00:00:00 2001 From: Niko Pen <42466421+nikopen@users.noreply.github.com> Date: Mon, 17 Dec 2018 11:03:04 -0800 Subject: [PATCH] ExternalName cleanup (#11326) * Remove old kube-dns note * ExternalName IP clarification * Add minor edits for clarity * corrections Co-Authored-By: nikopen <42466421+nikopen@users.noreply.github.com> --- .../en/docs/concepts/services-networking/service.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index 37cc723539..4b5bbba41f 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -758,13 +758,10 @@ for supported instance types. ### Type ExternalName {#externalname} -{{< note >}} -ExternalName Services are available only with `kube-dns` version 1.7 and later. -{{< /note >}} +Services of type ExternalName map a service to a DNS name, not to a typical selector such as +`my-service` or `cassandra`. You specify these services with the `spec.externalName` parameter. -Services of type ExternalName map a service to a DNS name (specified using -the `spec.externalName` parameter) rather than to a typical selector like -`my-service` or `cassandra`. This Service definition, for example, would map +This Service definition, for example, maps the `my-service` Service in the `prod` namespace to `my.database.example.com`: ```yaml @@ -777,6 +774,10 @@ spec: type: ExternalName externalName: my.database.example.com ``` +{{< note >}} +ExternalName accepts an IPv4 address string, but as a DNS name comprised of digits, not as an IP address. ExternalNames that resemble IPv4 addresses are not resolved by CoreDNS or ingress-nginx because ExternalName +is intended to specify a canonical DNS name. To hardcode an IP address, consider headless services. +{{< /note >}} When looking up the host `my-service.prod.svc.cluster.local`, the cluster DNS service will return a `CNAME` record with the value `my.database.example.com`. Accessing