CNAME record

533

A Canonical Name record (abbreviated as CNAME record), is a type of resource record in the Domain Name System(DNS) that maps one domain name (an alias) to another (the canonical name), according to Wikipedia.

Stuff you wanna know:

  1. Kubernetes ServiceTypes allow you to specify what kind of Service you want. The Type value of ExternalName: Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value.
  2. When a Pod is run on a Node, the kubelet adds a set of environment variables for each active Service. It adds {SVCNAME}_SERVICE_HOST and {SVCNAME}_SERVICE_PORT variables, where the Service name is upper-cased and dashes are converted to underscores.
  3. When looking up the host my-service.prod.svc.cluster.local, the cluster DNS Service returns a CNAME record with the value my.database.example.com.
  4. 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.
  5. For headless Services that do not define selectors, the endpoints controller does not create Endpoints records. However, the DNS system looks for and configures either CNAME records for ExternalName-type Services, or records for any Endpoints that share a name with the Service, for all other types.

More stuff:

  1. On Wikipedia — https://en.wikipedia.org/wiki/CNAME_record
  2. Service — https://kubernetes.io/docs/concepts/services-networking/service/
  3. Type ExternalName — https://kubernetes.io/docs/concepts/services-networking/service/#externalname
  4. What are Kubernetes Services (VMware) — https://www.vmware.com/topics/glossary/content/kubernetes-services.html