Maps the Service to the contents of the externalName field (for example, to the hostname api.foo.bar.example). The mapping configures your cluster's DNS server to return a CNAME record with that external hostname value. No proxying of any kind is set up.
Introduction to ExternalName
This service type is a little bit different, as it is not used to provide a stable endpoint to an internal service but to an external one. For example, let’s say we have a database running at my-db.company.com. Instead of having this endpoint hardcoded or defined in a config somewhere, we could create a db service like the following: