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:
- 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.
- 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.
- 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.
- 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.
- 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:
- On Wikipedia — https://en.wikipedia.org/wiki/CNAME_record
- Service — https://kubernetes.io/docs/concepts/services-networking/service/
- Type ExternalName — https://kubernetes.io/docs/concepts/services-networking/service/#externalname
- What are Kubernetes Services (VMware) — https://www.vmware.com/topics/glossary/content/kubernetes-services.html